给时间处理程序绑定特定的上下文

function bind(context,name){
    return function(){
        return context[name].apply(context,arguments);
    }
}

 

posted @ 2017-11-08 23:13  halo-漾  阅读(133)  评论(0)    收藏  举报