改变函数运行时的上下文|函数内部this的指向

  • func.apply(this,[arg1,arg2]);
    func.call(this,arg1,arg2);

     

  

posted @ 2019-07-10 17:28  五两饭  阅读(287)  评论(0编辑  收藏  举报