<html>
<head>
<script>
var hour=0;
var minute=0;
var second=0;
function dc()
{
window.setInterval("uc()",1000);
}
function uc()
{
document.getElementById("h").innerHTML=hour;
document.getElementById("m").innerHTML=minute;
document.getElementById("s").innerHTML=second;
++second;
if(second==60)
{
minute++;
second=0;
if(minute==60)
{
hour++;
minute=0;
}
}
}
</script>
</head>
<body onload="dc()">
<table border=5>
<tr>
<td>hr</td>
<td>min</td>
<td>sec</td>
</tr>
<tr>
<td><p id="h"></p></td>
<td><p id="m"></p></td>
<td><p id="s"></p></td>
</tr>
</table>
</body>
</html>
0 Comments