如何显示时间
<script type="text/javascript">
var attime;
function cloc(){
var time=new Date();
attime= time.getHours()+":"+time.getMinutes()+":"+time.getSeconds() ;
document.getElementById("clock").value = attime;
}
//setInterval("cloc()",1000);
</script>
请问为何注释setInterval("cloc()",1000);后运行不能显示日期?