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();

上一篇:js函数语法


下一篇:Codeforces Round #288 (Div. 2)