function F() {
function C() {
return this;
}
return C();
}
var o = new F();
Run Code Online (Sandbox Code Playgroud)
细分组件元素.
假设你要这样做:
function C() {
return this;
}
var o = C();
Run Code Online (Sandbox Code Playgroud)
这里显然没有对象上下文,所以this也是如此window.
在构造函数中包装该设置并不会改变直接调用的上下文中不涉及任何对象的事实C().
| 归档时间: |
|
| 查看次数: |
143 次 |
| 最近记录: |