课堂点名器
截图:
源码
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
body{font:12px/180% "Microsoft YaHei","微软雅黑", "宋体";
background-color:#CCC;
opacity:0.9;
}
#box{margin:auto;width:660px;font-size:66px;height:94px;line-height:94px;overflow:hidde n;color:#138eee;text-align:center;padding:0 30px;margin-top:200px;}
#bt{margin:auto;width:200px;text-align:center;margin-top:75px;color:#fff;font-size:25px;lin e-height:45px;cursor:pointer;
background-color:#09F;
}
var list="曹迎年,庄臣,周健龙,夏志龙,徐斌";
var namelist=list.split(",");
var mytime=null;
function doit(){
var bt=window.document.getElementById("bt");
if(mytime==null){
bt.innerHTML="停止点名";
show();
}else{
bt.innerHTML="开始点名";
clearTimeout(mytime);
mytime=null;
}
}
function show(){
var box=window.document.getElementById("box");
var num=Math.floor((Math.random()*100000))%namelist.length;
box.innerHTML=namelist[num];
mytime=setTimeout("show()",1);
}