摘要: // 函数节流 var canRun = true; document.getElementById("throttle").onscroll = function(){ if(!canRun){ // 判断是否已空闲,如果在执行中,则直接return return; } canRun = false; setTimeout(fu... 阅读全文
posted @ 2017-11-29 16:46 猫-前端之路 阅读(306) 评论(0) 推荐(0) 编辑