1.top
This change always refers to the top-level browser window of the split window. If you plan to execute commands from the top level of the split window, you can use the top variable.
2.opener
Opener The object that is used to refer to the page that executes the window.open method on the window.open page. For example: A page with the window.open () method pops up the B page, in the B page can be opener to reference a page, so you can use this object to the a page operation.
3.parent
The parent is used to access the object in the child page that is generated in iframe,frame. For example: A page has an IFRAME or frame, then the page in the IFRAME or frame can refer to the object in page A through the parent object, so that the value can be obtained or returned to the a page.
4. In addition, self refers to the current window
(1) Window.top
(2) Window.opener
(3) Window.parent
(4) Self
(5) The difference between parent and opener
Parent refers to the Father window, and the parent of frame in frameset is the frameset window;
Opener refers to the original window corresponding to the new window created by window.open and other means;
The parent is an object that is relative to the frame;
opener is the parent window for a window opened with window.open, provided the window.open is open. Document.parentWindow.menthod () How to adjust the parent page
<! doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Attached: Window object, parent object, frame object, Document object, and hierarchy Relation of Form Object Window object →parent Object →frame Object →document object →form object, as follows:
Parent.frame1.document.forms[0].elements[0].value;
JavaScript Basics-Window objects (Windows)