By.KaBuS weB MaSteR
Mesaj Sayısı : 223 Kayıt tarihi : 13/06/09 Yaş : 31 Nerden : Notalar İcinden Lakap : By.KaBuS
| Konu: 20 saniyede kaç kutu dolduracaksın oyunu Ptsi Haz. 15, 2009 9:18 pm | |
| - Kod:
-
<html> <HEAD> <title>z-kutu_doldurmaca</title> <script LANGUAGE="Javascript"> <!-- Original: Tomer Shiran <!-- 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[i].checked = false } } // End --> </script> </HEAD> <BODY> <CENTER>20 saniyede kaç kutu doldurabilirsiniz? </CENTER> <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" onClick="display(this)">')} document.write("<BR>")} document.write("<HR SIZE=1 WIDTH=40%>") document.write('<INPUT TYPE="button" VALUE="Yeni" '); document.write('onClick="restart(this.form)">') document.write("</CENTER></FORM>") // End --> </script> </BODY> </html>
| |
|