javascript问题里函数节流的实现有误~
webfansplz opened this issue · 1 comments
webfansplz commented
function throttle(method, context) {
clearTimeout(methor.tId);
method.tId = setTimeout(function(){
method.call(context);
}, 100); // 两次调用至少间隔 100ms
}
// 调用
window.onresize = function(){
throttle(myFunc, window);
}
这段代码的实现应该是函数防抖哦!!!
nanhupatar commented
emm,确实是。高程里面弄错了