1 |
<SCRIPT LANGUAGE="JavaScript">
|
2 |
var timerID = null; // setTimeout handle
|
3 |
var running = false;
|
4 |
function stopclock() {
-
if ( running ) clearTimeout(timerID);
-
running = false;
|
5 |
}
|
6 |
function startclock() {
|
7 |
}
|
8 |
function showtime() {
-
// Calculate and display current time:
-
document.clock.face.value = timeValue;
-
// Timeout for one second:
-
timerID = setTimeout("showtime()", 1000);
-
running = true;
|
9 |
}
|
10 |
</SCRIPT>
|