Do stuff every n msec


/ Published in: JavaScript
Save to your folder(s)

It will be executed onload


Copy this code and paste it in your HTML
  1. (function showTime() {
  2. var d = new Date();
  3. document.getElementById('time').innerHTML = d;
  4.  
  5. setTimeout(showTime, 1000);
  6. })();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.