<div class="codetitle"> <span><a style="CURSOR: pointer" data="121" class="copybut" id="copybut121" onclick="doCopy('code121')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code121"> <br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" <BR>"http://www.w3.org/TR/html4/loose.dtd"> <br><html> <br><head> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <br><title>点名</title> <br><script language="javascript" type="text/javascript"> <br>var status = 1; <br>var name = new Array('范 鹏','张子涵','代天明','孙 季','孙 磊','王鸿罡','曾凡丁','李 欢','朱 颖','王 莎','郑琳琳','朱振家','金 一','李成龙','苟 超','吴 桐','梁 良','刘 俊'); <br><br>function getname(){ <br>return name[Math.floor(Math.random()*name.length)]; <br>} <br>function showname(){ <br>document.getElementById("name").innerHTML = getname(); <br>setTimeout("showname",200); <br>} <br>function goname(){ <br>intimer = setInterval(showname, 200); <br>} <br>function stopname(){ <br>if(status == 1){ <br>clearInterval(intimer); <br>status = 0; <br>}else{ <br>intimer = setInterval(showname, 200); <br>status = 1; <br>} <br>} <br></script> <br><style> <br>#name{ <br>border:1px solid #000; <br>margin:auto; <br>font-size:36px; <br>color:#000000; <br>width:108px; <br>height:1em; <br>cursor:pointer; <br>text-align:center; <br>} <br></style> <br></head> <br><body onLoad="goname()"> <br><div id="name" onClick="stopname()"></div> <br></body> <br></html> <br> </div>