Скрипт часиков

<head>
<title>Скрипты часиков</title>
<script language="JavaScript" type="text/javascript">
<!--
function clock() {
var theDate = new Date();
var hours, minutes, seconds;
hours = theDate.getHours();
hours = (hours < 10) ? "0" + hours : hours;
minutes = theDate.getMinutes();
minutes = (minutes < 10) ? "0" + minutes : minutes;
seconds = theDate.getSeconds();
seconds = (seconds < 10) ? "0" + seconds : seconds;
var strDate =  hours + ":" + minutes + ":" + seconds;
document.forms['clockForm'].clockBox.value=strDate;  
setTimeout("clock()", 1000);}
//-->
</script>
</head>
<body onLoad="clock()">
<form name="clockForm">Текущее время: <input type="text" name="clockBox" size="6"></form>
</body>
</html>

Hosted by uCoz