dda_add,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<span id="hours"></span>
<span id="minutes"></span>
<span id="seconds"></span>
<script>
function up(id, value)
{
var el = document.getElementById(id);
if(el.innerHTML != value) el.innerHTML = value
}
function setZero(time) {
return (time < 10)
? '0' + time
: time;
}
function time(){
var date = new Date();
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
up('hours', hours);
up('minutes', setZero(minutes));
up('seconds', setZero(seconds));
requestAnimationFrame(time);
}
time();
</script>
</body>
</html>