Window parent 属性
定义和用法
parent 属性返回当前窗口的父窗口。
该属性是只读的。
浏览器支持
| 属性 | |||||
|---|---|---|---|---|---|
| parent | Yes | Yes | Yes | Yes | Yes | 
语法
window.parent
技术细节
| 返回值: | 当前窗口的父窗口对象 | 
|---|
更多实例
实例
打开新窗口时提醒父窗口的网址:
window.open("", "", "width=200, height=100");
alert(window.parent.location);
亲自试一试 »
alert(window.parent.location);
❮ Window 对象
