Create Clock on JavaScript [SIMPLE]
Source Clock [SIMPLE]
<!DOCTYPE html>
<!-- ajCaFc.simpleClock --!>
<html>
<head>
<script type="text/javascript">
function startTimeCaFc()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// ajCaFc.simpleClock<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTimeCaFc()',500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
</head>
<body onload="startTimeCaFc()">
<div id="txt"></div>
</body>
</html>
<!-- ajCaFc.simpleClock --!>
<!-- ajCaFc.simpleClock --!>
<html>
<head>
<script type="text/javascript">
function startTimeCaFc()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// ajCaFc.simpleClock<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTimeCaFc()',500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
</head>
<body onload="startTimeCaFc()">
<div id="txt"></div>
</body>
</html>
<!-- ajCaFc.simpleClock --!>