Skip to content

Instantly share code, notes, and snippets.

@alyssarosenzweig
Created April 9, 2012 20:47
Show Gist options
  • Save alyssarosenzweig/2346461 to your computer and use it in GitHub Desktop.
Save alyssarosenzweig/2346461 to your computer and use it in GitHub Desktop.
<html>
<body onload="myFunction();">
<script type="text/javascript">
function myFunction() {
var d = new Date();
var y = d.getHours() + ":" + d.getMinutes();
document.getElementById("dash").innerHTML = y;
setTimeout(myFunction, 2000);
}
</script>
<div id="dash">00:00</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment