There is a relationship between the two windows. Parent window parent.htmopen window son.htm
The child window can point to the parent window through window. opener. In this way, the object of the parent window can be accessed.
Advantage: convenient value. As long as window. opener points to the parent window, all objects can be accessed.
Not only can access the value, but also can access the parent window method. The value length is unlimited.
Disadvantage: there must be a relationship between the two windows. It is the window opened by window. open. Cross-Domain is not allowed.
Post.htm
<Input type = text name = maintext>
<Input type = button onclick = "too many open('read.htm')" value = "Open">
Read.htm
<Script language = "javascript">
// Window. open window.
// Use opener to point to the parent window.
Var parentText = too many opener.doc ument. all. maintext. value;
Alert (parentText );
</Script>