Created
August 18, 2015 12:59
-
-
Save anonymous/fdd7c791f4c14ef5ba94 to your computer and use it in GitHub Desktop.
Cow Clicker // source http://jsbin.com/rosese
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Cow Clicker</title> | |
| <style id="jsbin-css"> | |
| .myButton { | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <button class="myButton" onclick="countClicks()">Click ME!</button> | |
| <p id="number"></p> | |
| <script id="jsbin-javascript"> | |
| var clicks=0; | |
| function countClicks() { | |
| document.getElementById("number").innerHTML = clicks; | |
| clicks= clicks + 1; | |
| console.log(clicks); | |
| if (clicks > 10){ | |
| alert ("stop clicking me"); | |
| } | |
| } | |
| </script> | |
| <script id="jsbin-source-css" type="text/css"> | |
| .myButton { | |
| }</script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var clicks=0; | |
| function countClicks() { | |
| document.getElementById("number").innerHTML = clicks; | |
| clicks= clicks + 1; | |
| console.log(clicks); | |
| if (clicks > 10){ | |
| alert ("stop clicking me"); | |
| } | |
| } | |
| </script></body> | |
| </html> |
This file contains hidden or 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
| .myButton { | |
| } |
This file contains hidden or 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 clicks=0; | |
| function countClicks() { | |
| document.getElementById("number").innerHTML = clicks; | |
| clicks= clicks + 1; | |
| console.log(clicks); | |
| if (clicks > 10){ | |
| alert ("stop clicking me"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment