>
|
this Real time clock show the takes the time from the computer, so it will show the time that the computer is set on, if the time on the computer is right so will be the time in the Real time clock!!! |
|
<script language="JavaScript"> function showRealTime() { var TheTimeNow = new Date(); var hours = TheTimeNow.getHours(); var minutes = TheTimeNow.getMinutes(); var seconds = TheTimeNow.getSeconds(); var timeString = "" + ((hours > 12) ? hours - 12 : hours); timeString += ((minutes < 10) ? ":0" : ":") + minutes; timeString += ((seconds < 10) ? ":0" : ":") + seconds; timeString += (hours >= 12) ? " p.m " : " a.m "; document.form1.>line1.value = timeString; timerID = >setTimeout("showRealTime()", 1000); } </script> |
|
<form name="form1"> <input type="text" name="line1" size=14> </form> |
|
<:BODY onload="ShowRealTime()"> |