摘要:
call 和apply都是为了改变当前对象的this指针。传入第一个是一个对象也是this指针,第二个是参数。func var防止抖动js//取自UnderscoreJS实用框架functiondebounce(func,wait,immediate){vartimeout;returnfunction(){varcontext=this,args=arguments;varlater=function(){timeout=null;if(!immediate)func.apply(context,args);};varcallNow=immediate&&!timeout;c 阅读全文
posted @ 2013-11-22 15:07
陈小胖胖blog
阅读(286)
评论(0)
推荐(0)


浙公网安备 33010602011771号