1. Child pages are displayed through window. open on the parent page.
You only need to add window. opener in front of the document.
For example:
1. Parent Page code:
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> untitled document title>
Head>
<Script language = "javascript">
Function tanchu ()
{
Window. open ("Untitled-5.html ");
}
Script>
<Body>
<Form id = "form1" name = "form1" method = "post" action = "">
<Label> <input type = "submit" name = "button" id = "button" value = "submit"
Onclick = "tanchu ()"/>
Label> <input type = "text" name = "textfield" id = "textfield"/>
Label>
Form>
</Body>
</Html>
2. subpage code:
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> untitled document title>
Head>
<Script language = "javascript">
Function aaa ()
{
Optional values opener.doc ument. getElementByIdx ('textfield'). value = '20140901 ';
}
Script>
<Body>
<Form id = "form1" name = "form1" method = "post" action = "">
<Label> <input type = "submit" name = "button" id = "button" value = "submit"
Onclick = "aaa ()"/>
Label>
Form>
</Body>
</Html>
Ii. subpages are pages in the iframe framework
You only need to add a parent before the document.
1. Parent Page code:
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> untitled document title>
Head>
<Body>
<Form id = "form1" name = "form1" method = "post" action = "">
<Label> <input type = "text" name = "textfield" id = "textfield"/>
Label>
<Iframe id = "myiframe" src = "Untitled-3.html"> iframe>
Form>
</Body>
</Html>
2. subpage code
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> untitled document title>
Head>
<Script language = "javascript">
Function aa ()
{
Var a=parent.doc ument. getElementByIdx ('textfield'). value;
Alert ();
}
Script>
<Body>
<Form id = "form1" name = "form1" method = "post" action = "">
<Label> <input type = "submit" name = "button" id = "button" value = "submit"
OnClick = "aa ()"/>
Label>
Form>
</Body>
</Html>