---
title: "Js中的window.parent ,window.top,window.self 代表的对象"
author: "左博涯"
date: "2009-01-22T16:05:07Z"
tags: []
slug: "js-window-parent-window-top-window-self"
draft: false
lastmod: "2009-01-22T16:05:07Z"
id: 319992
url: "https://zoboya.iteye.com/blog/319992"
---

在应用有frameset或者iframe的页面时，parent是父窗口，top是最顶级父窗口（有的窗口中套了好几层frameset或者iframe），self是当前窗口， opener是用open方法打开当前窗口的那个窗口。