节流函数实现2014年9月30日var timer = null;$(window).on('事件名称',function(){ if(timer){ clearTimeout(timer) } timer = setTimeout(function(){ //执行相应函数 },400); });