If js, window. open ("B window") is called in window ");
Then, when js is called in window B, window. opener can get window.
Parent indicates the parent window. For example, if A page A uses iframe or frame to call page B, the window where page A is located is the parent of page B. In JS, window. opener only references the parent window of the pop-up window. For example, in a.html, window. open a new window B .html by clicking a button. In B .html, you can access the.html content by writing an example of opener(specifically, opener.pdf to reference a.html, and wrap the.html documentobject.
If this reference fails, null is returned. Therefore, before calling an opener object, you must first determine whether the object is null. Otherwise, a JS error "the object is empty or does not exist" will occur.
If a frameset contains multiple frames and framset,
When obtaining the sub-frameset, you know that the parent frameset can directly use the. framset name attribute;
In addition, the. name attribute can be obtained across layers.
For example:
<Frameset rows = "20, 40, 50" cols = "*" name = "main">
<Frame src = "" name = "chid1"/>
<Frame src = "" name = "child2"/>
<Frameset rows = "*" cols = "50%, *" name = "child3">
<Frame src = "a.html" name = "child4"/>
<Frame src = "B .html" name = "child5"/>
</Frameset>
</Frameset>
When you use js in B .html to obtain child1, you can use parent. child1
When you use js in B .html to obtain child4, you can use parent. child4.