首页 > 代码库 > 代码制作速度与准确性的训练
代码制作速度与准确性的训练
<!--要完成此效果把如下代码加入到<body>区域中--><SCRIPT LANGUAGE="JavaScript"><!-- Original: Tomer Shiran<!-- This script and many more are available free online at --><!-- The JavaScript Source!! http://javascript.internet.com --><!-- Beginvar total = 0var play = falsefunction display(element) {var now = new Date()if (!play) {play = truestartTime = now.getTime()}if (now.getTime() - startTime > 20000) {element.checked = !element.checkedreturn}if (element.checked)total++elsetotal--element.form.num.value = total}function restart(form) {total = 0play = falsefor (var i = 1; i <= 100; ++i) {form.elements[i].checked = false}}// End --></SCRIPT><!--要完成此效果把如下代码加入到<body>区域中石家庄花卉租赁--><SCRIPT LANGUAGE="JavaScript"><!-- Begindocument.write("<FORM><CENTER>")document.write(‘<INPUT TYPE="text" VALUE="http://www.mamicode.com/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="http://www.mamicode.com/restart" ‘);document.write(‘onClick="restart(this.form)">‘)document.write("</CENTER></FORM>")// End --></SCRIPT>
代码制作速度与准确性的训练
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。