Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Window.top

概述

返回窗口体系中的最顶层窗口的引用。

语法

var topWindow = window.top;

备注

 window.parent 返回当前窗口的父对象,而 window.top 返回最顶层的窗口对象。

当你在处理父窗口的子框架(subframe),而你想获取顶层框架时,这个属性相当有用。

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

Gecko 备注

备注:Gecko 6.0 开始,该属性被修正为 只读(read only)

规范

HTML5

文档标签和贡献者

标签: 
 此页面的贡献者: teoli, AlexChao, Josephok
 最后编辑者: AlexChao,