Javascripts > Javascript Clocks > BN Clock
Script Title: BN Clock
Description: A simple and reliable clock made in javascript. Displays hours, minutes, and seconds, updates every second
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<script language="JavaScript"> <!-- //Supplied free by js.brimonet.com var clockID = 0; function UpdateClock() { if(clockID) { clearTimeout(clockID); clockID = 0; } var tDate = new Date(); document.theClock.theTime.value = "" + tDate.getHours() + ":" + tDate.getMinutes() + ":" + tDate.getSeconds(); clockID = setTimeout("UpdateClock()", 1000); } function StartClock() { clockID = setTimeout("UpdateClock()", 500); } function KillClock() { if(clockID) { clearTimeout(clockID); clockID = 0; } } //--> </script>
Copy the following code INTO your <BODY> tag.onload="StartClock()" onunload="KillClock()"
Copy the following code between the <BODY></BODY> tags of your html page.<center><form name="theClock"> <input type=text name="theTime" size=8> <form></center>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email