1.top
The change always refers to the top-level browser window of the split window. If you plan to execute commands from the highest level of the split window, you can use the top variable.
2.opener
opener is used in the window.open page to reference the object of the page that executes the window.open method. For example: Page A uses window.open() method
The method pops up the B page. In the B page, you can reference the A page through opener, so that you can operate the A page through this object.
3.parent
parent is used to access the object of the parent page in the child page generated in the iframe or frame. For example: There is an iframe or frame in page A, then the iframe
Or the page in the frame can reference the object in page A through the parent object. In this way, the value can be obtained or returned to the A page.
4. In addition, self refers to the current window
The difference between parent and opener:
parent refers to the parent window. In FRAMESET, the PARENT of FRAME is the FRAMESET window.
opener refers to the original window corresponding to the new window created using WINDOW.OPEN and other methods.
parent is the parent window object relative to the frame
opener is the parent window for the window opened with window.open, provided that it is opened by window.open
document.parentWindow.menthod() uses the method of the parent surface
Attached: Hierarchical relationship between Window object, Parent object, Frame object, Document object and Form object
Window object→Parent object→Frame object→Document object→Form object,
As follows: parent.frame1.document.forms[0].elements[0].value;