container.onmouseover=stop;
stop后为什么不用加括号啊。stop不是方法吗?
源码
var timer;
function play(){
timer=setInterval(function(){next.onclick()},1000);
}
function stop(){
clearInterval(timer);
}
play();
container.onmouseover=stop;
container.onmouseout=play;
stop后为什么不用加括号啊。stop不是方法吗?
源码
var timer;
function play(){
timer=setInterval(function(){next.onclick()},1000);
}
function stop(){
clearInterval(timer);
}
play();
container.onmouseover=stop;
container.onmouseout=play;
2015-12-26
举报