A Skill Game...

2 Conversations

<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[i].checked = false
}
}
// End -->
</SCRIPT>

</HEAD>

<BODY>

<CENTER>Test your skill. How many boxes can
you check in 20 seconds?</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" ');
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>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<BR/>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.63 KB -->
</BODY>

Bookmark on your Personal Space


Conversations About This Entry

Entry

A286823

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


References

External Links

Not Panicking Ltd is not responsible for the content of external internet sites

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more