home *** CD-ROM | disk | FTP | other *** search
- // Clock JavaScript
- // Create three text boxes called hours, minutes and seconds
- // In the onload event of the body tag, add the line "settime()"
-
- function settime()
- {
- date = new Date();
- document.all('hours').value=date.getHours();
- document.all('minutes').value=date.getMinutes();
- document.all('seconds').value=date.getSeconds();
- window.setTimeout("settime()", "500");
- }