使用document.defaultView;

document.defaultView === window

 

注意: 

1. 如果当前文档不属于window对象, 则返回null;

2. document.defaulView 是 document 的快捷方式属性;

相关文章:

  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案