计时器setInterval的作用
<script type="text/javascript">
var attime;
function clock(){
var time=new Date();
attime=time.getHours()+time.getMinutes()+time.getSeconds() ;
document.getElementById("clock").value = attime;
}
var int=setInterval(clock,100) ;
</script>
看不懂这里document.getElementById("clock").value = attime;的用意?还有为什么要把setInterval(clock,100)存储在变量int中?