Last active
January 25, 2018 18:13
-
-
Save sayham-sjb/eadb6d5c1867f82510502541addd8ded to your computer and use it in GitHub Desktop.
ClickCountWithJavaScript1 #js #VS
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
var count = 0; | |
var countButton = document.getElementById("countButton"); | |
var displayCount = document.getElementById("displayCount"); | |
countButton.onclick = function(){ | |
count++; | |
displayCount.innerHTML = count; | |
} | |
resetButton.onclick = function(){ | |
count = 0; | |
displayCount.innerHTML = count; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment