防抖与节流原理与区别
摘要:
// 防抖就是事件 :多次触发事件后, //事件处理函数只执行一次, //并且是在触发操作结束时执行 //事件多次触发清除之前的定时器 let timer; window.onscroll = function() { console.log(12) if (timer) { clearTimeou 阅读全文
posted @ 2018-12-10 17:59 田庚的博客园 阅读(1920) 评论(0) 推荐(0)
浙公网安备 33010602011771号