直接上代码:var test = { outer: function () { // 此时this指向test对象
console.log(this);
function inner() { // 此时this指向window
console.log(this);
}
inner();
}
}造成上述代码this指向不同的原因是什么呢?到现在都是很明白,求大神解答!
添加回答
举报
0/150
提交
取消