this和call

function foo(x){
console.log(x);
}

foo.call(this,'abc');
console.log(this);

----

abc

 

posted @ 2016-08-26 17:12  qqisnow2021  阅读(97)  评论(0编辑  收藏  举报