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;
  5. setTimeout(showTime, 1000);
  6. })();

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.