<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>福利。</title>
<style type="text/css"> * { margin: 0; padding: 0; list-style-type: none; } a, img { border: 0; } body { font: 12px/180% "Microsoft YaHei", "微软雅黑", "宋体"; } #bodybj { background: url(images.jpg) no-repeat center top; } #box { margin: auto; width: 660px; font-size: 66px; height: 350px; line-height: 94px; overflow: hidden; color: #138eee; text-align: center; padding: 0 30px; margin-top: 50px; border: 3px solid #60FF60 } #bt { margin: auto; width: 200px; text-align: center; margin-top: 75px; color: #4AB048; font-size: 25px; line-height: 28px; cursor: pointer; } </style> <script type="text/javascript"> var namelist = [ "前台", "前台", "六个核桃", "六个核桃", "六个核桃", "六个核桃", "六个核桃", "六个核桃", "加藤鹰", "前台", "前台", "前台", "前台", "前台", "六个核桃", "傻航", "傻航", "傻航", "傻航", "傻航", "傻航" ]; 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); } </script> </head>
<body id="bodybj"> <div id="box">今晚谁会陪你睡??</div> <div id="bt" onClick="doit()">开始寻觅</div> <div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"> </div> </body>
</html>
|