Код:
Часы: 0:09:42 <span id="miniclock"><noscript>Включите JavaScript для отображения часов</noscript></span>
<script language="JavaScript" type="text/javascript">
<!-- JavaScript часы от сервиса WebMasta.org -->
<!--
function runMiniClock()
{
var time = new Date();
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
minutes=((minutes < 10) ? "0" : "") + minutes;
hours=(hours > 24) ? hours-24 : hours;
hours=(hours == 0) ? 0 : hours;
var clock = hours + ":" + minutes + ":" + seconds;
if(clock != document.getElementById('miniclock').innerHTML) document.getElementById('miniclock').innerHTML = clock;
timer = setTimeout("runMiniClock()",1000);
}
runMiniClock();
//-->
</script>