function start()
{
	var time=new Date();
	
	var hh=time.getHours();
	document.getElementById("hour").innerHTML=hh;	
	
	var mm=time.getMinutes();
	document.getElementById("minute").innerHTML=mm;
	
	var ss=time.getSeconds();
	document.getElementById("seconds").innerHTML=ss;
	
	var ms=time.getMilliseconds();
	document.getElementById("milliseconds").innerHTML=ms;
}

function stop()
{
	window.clearInterval(timer);
}

var timer=window.setInterval(start,1);
document.getElementById("btnStop").onclick=stop;