Вот так получаются ЧАСЫ
From : Anton Agapov (2:5030/854.22)
<FORM NAME="clock">
<INPUT NAME="face" TYPE="TEXT" VALUE="hh:mm:ss" SIZE=6>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<!--
updateClock();
function updateClock() {
var time = new Date();
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
document.clock.face.value =
((hours < 10) ? '0' + hours : hours) +
':' + ((minutes < 10) ? '0' + minutes : minutes)
+
':' + ((seconds < 10) ? '0' + seconds : seconds);
setTimeout("updateClock()",1000);
}
//-->
</SCRIPT>
<p>
К огавлению
|