<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>clock</title>
<script>
function showTime(){
var timeNow = new Date();
var h = timeNow.getHours();
var m = timeNow.getMinutes();
var s = timeNow.getSeconds();
h = checkTime(h);
m = checkTime(m);
s = checkTime(s);
document.getElementById("showClock").innerHTML = h+":"+m+":"+s;
setTimeout("showTime()",500);
}
function checkTime(i){
if(i<10){
i = "0" + i;
}
return i;
}
</script>
</head>
<body οnlοad="showTime()">
<div id="showClock"></div>
</body>
</html>