随笔分类 -  前端优化

防抖/节流
摘要:##防抖 防抖是,用户频繁触发事件(如:oninput/onscroll),但是只要最后一次,等用户输入完 / 滚完,就只执行最后一次 初稿 let timer = null input.oninput = function() { if(timer !== null) { clearTimeout 阅读全文

posted @ 2022-06-22 22:16 In-6026 阅读(34) 评论(0) 推荐(0)

导航