Created
July 24, 2019 15:53
-
-
Save adamconroy/d491b8efecc991a51626b5167b544aee to your computer and use it in GitHub Desktop.
Simple timer
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> | |
<style> | |
body { | |
background-color: black; | |
} | |
#timer { | |
color: magenta; | |
font-size: 1000px; | |
text-align: center; | |
} | |
</style> | |
<script type='text/javascript'> | |
var timer = 0; | |
function getTimer() { | |
return document.getElementById('timer'); | |
} | |
setInterval(function() { | |
timer++; | |
getTimer().innerHTML = '' + timer; | |
}, 1000); | |
</script> | |
</head> | |
<body> | |
<div id='timer'>0</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment