gaufeo 发表于 2007-4-27 10:31:27

***游戏类***速度与准确性的训练 规定时间内能点中多少?

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
要完成此效果需要两个步骤

第一步:把如下代码加入到<head>区域中

<script language="javascript">

<!-- original:tomer shiran



<!-- this script and many more are available free online at -->


<!-- the javascript source!! http://javascript.internet.com -->



<!-- begin

var total = 0

var play = false

function display(element) {

var now = new date()

if (!play) {

play = true

starttime = now.gettime()}

if (now.gettime() - starttime > 20000) {

element.checked = !element.checked

return

}

if (element.checked)

total++

else

total--

element.form.num.value = total

}

function restart(form) {

total = 0

play = false

for (var i = 1; i <= 100; ++i) {

form.elements.checked = false

   }

}

// end -->

</script>


第二步:把如下代码加入到<body>区域中

<script language="javascript">

<!-- begin

document.write("<form><center>")

document.write('<input type="text" value="0" ');

document.write('name="num" size=10 onfocus="this.blur()"><br>')

document.write("<hr size=1 width=40%>")

for (var i = 0; i < 10; ++i) {

for (var j = 0; j < 10; ++j) {

document.write('<input type="checkbox" ');

document.write('onclick="display(this)">')}

document.write("<br>")}

document.write("<hr size=1 width=40%>")

document.write('<input type="button" value="restart" ');

document.write('onclick="restart(this.form)">')

document.write("</center></form>")

// end -->

</script>
      










--------------------------------------

拥有三人行论坛管理系列软件,一个人就可以管理一个论坛的更新维护。还能使您的论坛有千人在线的真实火暴效果,让您不在为论坛因没有人气而留不住会员而烦恼,使您的论坛早日成为一流的论坛。详情请登陆网站:http://www.cnsrx.cn 三人行论坛管理软件,站长必备的专业好工具。(您使用的是免费版本,购买收费版本后,将不带广告。业务QQ:247216 44985227)
页: [1]
查看完整版本: ***游戏类***速度与准确性的训练 规定时间内能点中多少?