אני לא מומחה, אבל אני הייתי רושם את זה ככה:
קוד:
<script language="JavaScript">
function st()
{
var n = new Date();
var h = n.getHours();
var m = n.getMinutes();
var s = n.getSeconds();
h = ct(h);
m = ct(m);
s = ct(s);
document.getElementByID("tm").innerHTML="Current time: "+h+":"+m+":"+s";
t = setTimeout("st()",500);
}
function ct(i)
{
if (i<10)
i="0"+i;
return i;
}
</script>