Skip to content

Instantly share code, notes, and snippets.

@mikesjewett
Created August 7, 2012 21:36
Show Gist options
  • Save mikesjewett/3289589 to your computer and use it in GitHub Desktop.
Save mikesjewett/3289589 to your computer and use it in GitHub Desktop.
setInterval help
var int = self.setInterval(function(){clock()},1000);
function clock()
{
var d = new Date();
var t = d.toLocaleTimeString();
document.getElementById("clock").value = t;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment