There is a relationship between the two windows. Parent Window parent.htm Open child window son.htm
A child window can point to a parent window by Window.opener. This allows access to the object of the parent window.
Advantage: The value is convenient. You can access all objects as long as the window.opener points to the parent window.
You can access not only the values, but also the methods of the parent window. The value length is unlimited.
Disadvantages: Two windows have a relationship. is the window that is opened using window.open. Cannot cross domain.
Post.htm
<input Type=text name=maintext>
<input Type=button onclick= "window.open (' read.htm ')" value= "open" >
Read.htm
<script language= "JavaScript" >
window.open the open window.
Use opener to point to the parent window.
var parenttext = Window.opener.document.all.maintext.value;
alert (Parenttext);
</script>