我有以下功能執行的setTimeout回到自身,即:無法清除超時
var doIt = function(){
$('#comment_report').trigger('apexrefresh');
setTimeout("doIt()", 5000);
}
我的問題是,我想明確的是,通過每5秒循環的setTimeout的,通過發行:
clearTimeout(doIt);
不幸的是,這並沒有奏效。
有人可以協助我如何去清除上述setTimeout。
謝謝。
6答案停止超時4分鐘......你怎麼知道你應該已經GOOGLE了它... :-) – Homer6
https://developer.mozilla.org/zh-CN/docs/Web/API/window.clearTimeout –