父页面
<html>
<head>
<title> parent </title>
<script language="JavaScript">
function method(){
window.open("child.html");
}
</script >
</head>
<body>
<form method=post action="" >
<input type="text" name="" id="text1"><br>
</form >
<input type="button" value="foward" onclick="method()">
</body>
</html>
子页面
<html>
<head>
<title>child</title>
<script language="JavaScript">
function getValue(str){
window.opener.document.getElementById("text1").value=str; window.close();
}
</script >
</head>
<body>
<a href="" onclick="getValue('11')">11</a >
<a href="" onclick="getValue('22')">22</a >
<a href="" onclick="getValue('33')">33</a >
<a href="" onclick="getValue('44')">44</a >
</body>
</html>