Hi
This can be done using javascript, using the setTimeout method, for your convenience, I have created a sample page, it displays current time in a DIV control, just copy and paste the contents below in a notepad, and save it with .htm extension, and check the result.
<HTML>
<HEAD>
<TITLE>Show Time</</TITLE>
<script language="javascript">
function ShowTime()
{
var Digital = new Date();
var hours = Digital.getHours();
var minutes = Digital.getMinutes();
var seconds = Digital.getSeconds();
var dn = "AM";
if (hours > 12){
dn = "PM";
hours = hours-12;
}
if (hours == 0)
hours = 12;
if (minutes <= 9)
minutes = "0" + minutes;
if (seconds <= 9)
seconds = "0" + seconds;
//change font size here to your desire
myclock = "<b>Current Time:</br>"+hours+":"+minutes+":"
+seconds+" "+dn+"</b>"
document.getElementById("dvTime").innerHTML = myclock;
setTimeout("ShowTime()",1000)
} </script>
</HEAD>
<body onload="ShowTime()">
<div id=dvTime></div>
</body>
</HTML>
Regards
Mike
Fortune favours the brave, so don't regret on missed oppurtunities.
|