JavaScript
Clocks Equalizer Text in the Form Background Color Goodbye Pop-up MultiLink Window's Size MultiLink-II DHTML
Russian | Main Page
Useful links:
|
<html> <head> <title>www.redmount.com - JavaScript - Clocks</title> <SCRIPT LANGUAGE=JavaScript> <!-- function showTime() { var CurTime=new Date(); var h=CurTime.getHours(); var m=CurTime.getMinutes(); var s=CurTime.getSeconds(); if(document.htmlClocks.ae.checked) var STime=""+((h>12) ? h-12 : h); else var STime=""+h; STime+=((m<10)? ":0" : ":") + m; STime+=((s<10)? ":0" : ":") + s; if(document.htmlClocks.ae.checked) STime+=(h>=12)? " P.M." : " A.M."; document.htmlClocks.timeField.value=STime; timerId=setTimeout("showTime()",1000); } // --> </SCRIPT> </head> <body onLoad=showTime() bgcolor="White" leftmargin=30 marginwidth=30><br> <form name=htmlClocks> <input type=text name=timeField size=14> <input type=checkbox name=ae> (Euro/US) </form> </body> </html>