home *** CD-ROM | disk | FTP | other *** search
/ .net 1999 December / netCD65.iso / pc / Software / Construc / V4.0 / _SETUP.1 / Clock.jss < prev    next >
Encoding:
Text File  |  1999-07-01  |  381 b   |  12 lines

  1. // Clock JavaScript
  2. // Create three text boxes called hours, minutes and seconds
  3. // In the onload event of the body tag, add the line "settime()"
  4.  
  5. function settime()
  6. {
  7. date = new Date();
  8. document.all('hours').value=date.getHours();
  9. document.all('minutes').value=date.getMinutes();
  10. document.all('seconds').value=date.getSeconds();
  11. window.setTimeout("settime()", "500");
  12. }