-
- <html>
- <head>
- <script language="JavaScript">
- var MS =
navigator.appVersion.indexOf("MSIE");
- window.isIE4 = (MS > 0)
&& (parseInt(navigator.appVersion.substring(MS + 5, MS + 6))
>= 4);
- function lead0(val) {
- return (val < 10) ? "0"
+ val.toString() : val;
- }
- function buildTime() {
- var time = new Date();
- return lead0(time.getHours()) +
":" + lead0(time.getMinutes()) + ":" +
lead0(time.getSeconds());
- }
- function tick() {
- document.all.clock.innerText =
buildTime();
- }
- </script>
- </head>
- <body onunload="if (null!=window.tmr)
clearInterval(window.tmr);" onload="if (window.isIE4)
window.tmr = setInterval('tick()', 999);">
- <span ID="clock">
- <script language="JavaScript">
- document.write(buildTime());
- </script>
- </span>
- </body>
- </html>