假设父窗口的form名字为father,里面有一个input名字为inp,子窗口form名字son,里面有一个input名字为inp_son,则在弹出式窗口中这样写就可以得到父窗口的句柄和焦点:var obj = eval("window.opener.father.inp");
obj.focus(); //获取焦点
obj.value = document.son.inp_son.value; //取值
obj.focus(); //获取焦点
obj.value = document.son.inp_son.value; //取值
<br>
<br>
<br>
<INPUT id="t1" type="text" name="t1" value='我是父窗口!'>
<INPUT id="Button1" onclick='window.open("child.htm","","width=200,height=100")' type="button" value="打开" name="Button1">
</body>
child.htm:<body>
<INPUT id="Button1" onclick ="opener.t1.focus();opener.t1.select();" type="button" value="父窗口获得焦点" name="Button1">
</body>