<script>
var hua;
function clock(){
var time=new Date();
a=time.getHours();
b=time.getMinutes();
c=time.getSeconds();
if(a<10){
a='0'+a;
}else if(b<10){
b='0'+b;
}else if(c<10){
c='0'+c;
}
hua=a+':'+b+':'+c;
document.getElementById("clock").value=hua;
}
setInterval(clock,1000);
</script>
点赞123