三者都是用来改变函数的this对象的指向的

fun.call(this,a,b);   //相当于 this.fun(a,b)

fun.apply(this,[a,b]); //相当于 this.fun(a,b);

fun.bind(this);   // 返回 this.fun 

fun.bind(this)();  //相当于 this.fun();

 

posted on 2016-11-13 23:44  gamedaybyday  阅读(459)  评论(1)    收藏  举报