Count: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<html> <DIV ID="counter">Number of clicks = 0</DIV> <FORM> <INPUT TYPE="button" VALUE="Increment Counter" onclick="updateMessage()"> </FORM> <SCRIPT LANGUAGE="JavaScript"> <!-...") |
No edit summary |
||
Line 2: | Line 2: | ||
<DIV ID="counter">Number of clicks = 0</DIV> | <DIV ID="counter">Number of clicks = 0</DIV> | ||
<FORM> | <FORM> | ||
<INPUT TYPE="button" VALUE=" | <INPUT TYPE="button" VALUE="+" onclick="updateMessage()"> | ||
</FORM> | </FORM> | ||
<SCRIPT LANGUAGE="JavaScript"> | <SCRIPT LANGUAGE="JavaScript"> | ||
Line 10: | Line 10: | ||
function updateMessage() { | function updateMessage() { | ||
hits += 1; | hits += 1; | ||
document.getElementById("counter").innerHTML = " | document.getElementById("counter").innerHTML = "Total:" + hits; | ||
} | } | ||
Revision as of 18:57, 25 September 2013
Number of clicks = 0