小编Set*_*one的帖子

JavaScript this.window不等于window

考虑以下顶级JavaScript代码:

if (this.window === window)
    alert('same');
else
    alert('different'); // alerts: different  
Run Code Online (Sandbox Code Playgroud)

为什么this.window和window不完全相同?我也在表达式的rhs上尝试了'this'并得到了相同的结果.

javascript

5
推荐指数
1
解决办法
6168
查看次数

标签 统计

javascript ×1