Created
January 5, 2014 00:45
-
-
Save elialejandro/8262828 to your computer and use it in GitHub Desktop.
Contador de clicks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Contador de clicks</title> | |
<script> | |
var i = 0 | |
function clickLink() { | |
i++; | |
if (i == 1) { | |
document.getElementById("clicks").innerHTML = i; | |
} | |
else | |
{ | |
document.getElementById("clicks").innerHTML = i; | |
} | |
} | |
function Reset() { | |
i = 0; | |
document.getElementById("clicks").innerHTML = i; | |
} | |
</script> | |
</head> | |
<body> | |
<a href="javascript:clickLink();">Click aquí</a> | |
<p>Clicks <span id="clicks">0</span></p> | |
<a href="javascript:Reset();">Reset</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Serote