为什么setInterval()调用clock()函数的时候不需要加“()” ???--(setInterval(clock, 100);)
<script type="text/javascript">
var attime;
function clock() {
var time = new Date();
attime = time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds();
document.getElementById("clock").value = attime;
}
setInterval(clock, 100);
</script>