This script makes a clock on the status bar. This can be useful because it is visible all the time, and not just at the top of the page.
<Script LANGUAGE="JavaScript"> <!-- Hide this from older browsers var timerID = null; var TimerRunning = false;
function stop(){ if(TimerRunning) clearTimeout(timerID); TimerRunning = false; }
function display() { var thedate = new Date(); var hours = thedate.getHours(); var Min = thedate.getMinutes(); var Sec = thedate.getSeconds(); var TimeV = "" + ((hours >12) ? hours -12 :hours) TimeV += ((Min < 10) ? ":0" : ":") + Min TimeV += ((Sec < 10) ? ":0" : ":") + Sec TimeV += (hours >= 12) ? " P.M." : " A.M." window.status = TimeV; timerID = setTimeout("display()",1000); TimerRunning = true; }
function start() { stop(); display(); }
start();
// end hide --> </Script>