<SCRIPT>
|
var timerID = null; // will be returned by call to setTimeout
|
var timerrunning = false;
|
function stopclock() { // terminate timeout
-
if( timerrunning )
-
timerrunning = false; }
|
function startclock()
|
{ // terminate timeout, display time, start timeout
-
stopclock();showtime(); }
|
function showtime()
|
{ // display time, start timeout
-
// Calculate current time in timeValue
-
document.clock.face.value = timeValue;
-
timerID = setTimeout("showtime()",1000); // Update every second
-
timerrunning = true; }
|
</SCRIPT>
|