var attime;
function clock(){
var time=new Date();
attime=time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds();
document.getElementById("clock").value = attime;
}
setInterval(clock,10000);
交互时间以毫秒计,改成1000ms=1s就能读取了