//Some browser security level is relatively high, because of the security of JS, so there will be no access to local files, but there is no actual development of this situation, because the domain name, not the local file address. <HTML> <Head> <title>HTML example</title> </Head> <Body>Number:<inputtype= "text"ID= "Numid"/><BR/>Name:<inputtype= "text"ID= "NameID"/><BR/> <inputtype= "button"value= "Select"onclick= "Open1 ()"/><Scripttype= "Text/javascript">functionOpen1 () {window.open ("user.html","","width=250,height=150");}</Script> </Body></HTML>
Here is the code for user.html
<HTML> <Head> <title>HTML example</title> </Head> <Body> <TableBorder= "1"bordercolor= "Blue"> <TR> <TD>Operation</TD> <TD>Number</TD> <TD>Name</TD> </TR> <TR> <TD> <inputtype= "button"value= "Select"onclick= "open2 (' 100 ', ' Zhang San ');"/></TD> <TD>100</TD> <TD>Tom</TD> </TR> <TR> <TD> <inputtype= "button"value= "Select"onclick= "Open2 (' 101 ', ' John Doe ');"/></TD> <TD>101</TD> <TD>John doe</TD> </TR> <TR> <TD> <inputtype= "button"value= "Select"onclick= "Open2 (' 102 ', ' Harry ');"/></TD> <TD>102</TD> <TD>Harry</TD> </TR> </Table><Scripttype= "Text/javascript"> functionOpen2 (num1,name1) {varPwin=Window.opener; Pwin.document.getElementById ("Numid"). Value=num1; Pwin.document.getElementById ("NameID"). Value=name1; Window.close ();}</Script> </Body></HTML>
The result shown as point selection will appear click on Figure 2 of the selection number and name will be shown in Figure 1
window open new Windows case