js 防抖
ipt.oninput = antishake(function(){
console.log(this.value)
},500);
function antishake(fn,delay){
var t = null;
return function(){
if(t !== null){
clearTimeout(t);
}
t = setTimeout(() => {
fn.call(this);
},delay)
}
}
https://blog.csdn.net/qq_44741577/article/details/135951852
CSDN:防抖
浙公网安备 33010602011771号