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

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

 

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