标签:
var delayFn={ flag:+new Date().getTime(), mt:null, set:function(fn,delaytime){ var self=this, now=+new Date().getTime(), fc=now-self.flag; (fc>delaytime)&&(clearTimeout(self.mt),self.mt=window.setTimeout(function(){fn.call(null)},500),self.flag=now); } }
标签:
原文地址:http://www.cnblogs.com/anson0415/p/4573598.html