1 var taskId; 2 var __sto = setInterval; 3 window.setInterval = function(callback,timeout,param){ 4 var args = Array.prototype.slice.call(arguments,2); 5 var _cb = function(){ 6 callback.apply(null,args); 7 } 8 intervalTime[taskId]= __sto(_cb,timeout); 9 } 10 11 for(var i=0;i<taskIds.length;i++){ 12 taskId=taskIds[i]; 13 window.setInterval(CheckProgress,100,taskIds[i]); 14 }