父窗口页面
<title>
</title>
<script language="javascript">
function win(){
window.open("child.html",null,"height=150,width=200");
}
</script>
</head>
<table id="t1">
<tr><td id="dd">22</td></tr>
<tr><td id="bb">33</td></tr>
</table>
<input type="button" value="提交" οnclick="win()"/>
</html>
子窗口页面
<html>
<head>
<title>
</title>
<script language="javascript">
function win(){
window.opener.document.all.dd.innerText=document.getElementById("user").value;
window.opener.document.all.bb.innerText=document.getElementById("sex").value;
window.close();
}
</script>
</head>
<body>
user:
<input type="text" name="user" id="user"/>
<br>sex:
<input type="text" name="sex" id="sex"/>
<br>
<input type="button" value="提交" οnclick="win()"/>
</body>
</html>
<title>
</title>
<script language="javascript">
function win(){
window.open("child.html",null,"height=150,width=200");
}
</script>
</head>
<table id="t1">
<tr><td id="dd">22</td></tr>
<tr><td id="bb">33</td></tr>
</table>
<input type="button" value="提交" οnclick="win()"/>
</html>
子窗口页面
<html>
<head>
<title>
</title>
<script language="javascript">
function win(){
window.opener.document.all.dd.innerText=document.getElementById("user").value;
window.opener.document.all.bb.innerText=document.getElementById("sex").value;
window.close();
}
</script>
</head>
<body>
user:
<input type="text" name="user" id="user"/>
<br>sex:
<input type="text" name="sex" id="sex"/>
<br>
<input type="button" value="提交" οnclick="win()"/>
</body>
</html>