random background

function roll(){

  var bg = document.getElementById("loginbg");

  var rnd = Math.floor(Math.random()*4)+1;

  bg.src = "../images/bg_index"+rnd+".png";

}

roll();

posted @ 2016-03-17 09:49  goodbyepeterpan  阅读(164)  评论(0编辑  收藏  举报