<MCE: script language = "JavaScript"> <! -- <Br/> // define a tick function to obtain the system time <br/> function tick () <br/>{< br/> var year, month, day, hours, minutes, seconds, AP; <br/> var intyear, intmonth, intday, inthours, intminutes, intseconds; <br/> var today; <br/> today = new date (); <br/> intyear = today. getyear () + 1900; <br/> intmonth = today. getmonth () + 1; <br/> intday = today. getdate (); <br/> inthours = today. gethours (); <br/> intminutes = today. getminutes (); <br/> intseconds = today. getseconds (); <br/> // obtain the hours of the system time <br/> If (inthours = 0) <br/>{< br/> hours = inthours + ":"; <br/> ap = ""; <br/>}< br/> else if (inthours <12) <br/>{< br/> hours = inthours + ":"; <br/> ap = "Morning"; <br/>}< br/> else if (inthours = 12) <br/>{< br/> hours = inthours + ":"; <br/> ap = "Noon "; <br/>}< br/> else <br/> {<br/> inthours = intHours-12; <br/> hours = inthours + ":"; <br/> ap = "PM"; <br/>}< br/> // obtain the system time score <br/> If (intminutes <10) <br/>{< br/> minutes = "0" + intminutes + ":"; <br/>}< br/> else <br/> {<br/> minutes = intminutes + ":"; <br/>}< br/> // obtain the system time in seconds <br/> If (intseconds <10) <br/>{< br/> seconds = "0" + intseconds + ""; <br/>}< br/> else <br/> {<br/> seconds = intseconds + ""; <br/>}< br/> timestring = intyear + 'Year' + intmonth + 'month' + intday + 'day' + hours + minutes + seconds + AP; <br/> document. getelementbyid ("Clock "). innerhtml = timestring; <br/> // execute the tick function once every 0.1 seconds. <br/> window. setTimeout ("tick ()", 100); <br/>}< br/> window. onload = tick; <br/> // document. getelementbyid ("Clock "). innerhtml = timestring; <br/> // --> </MCE: SCRIPT> <br/> the DIV in the body is: <Div id = "Clock"> </Div