Just cut/copy/paste this code by J.D.


When you use the first short code, it may be best to first put it on a webpage, then check to see if it displays the correct time or not. The second code, should display the correct time, but is much longer in code.


Each of the code sets, are to be added between the <head> and </head> tags. (Don't forget to add the <body onload code to your body tag).





<html>
<head>
<script language="javascript">
<!--
function displaytime(){
now=new Date();
time=now.toLocaleString();
window.status=""+time
timeoutID=setTimeout('displaytime()'
,1000);
}
//-->
</script>
</head>
<body onLoad="displaytime();">
</body>
</html>