返回窗口层级最顶层窗口的引用。
语法
var topWindow = window.top;
备注
规范
Specification | Status | Comment |
---|---|---|
HTML Living Standard window.top |
Living Standard | |
HTML5 window.top |
Recommendation | Initial definition |
浏览器兼容性
BCD tables only load in the browser
返回窗口层级最顶层窗口的引用。
var topWindow = window.top;
Specification | Status | Comment |
---|---|---|
HTML Living Standard window.top |
Living Standard | |
HTML5 window.top |
Recommendation | Initial definition |
BCD tables only load in the browser