我在父窗口点击了某字段,弹出了子窗口,在子窗口中修改了父窗口的内容后,想要返回父窗口,但是父窗口在iframe中,我想保留原有框架,又想更新父窗口的内容,如何二者都实现??

解决方案 »

  1.   

    窗口给父窗口传值啊!!
    father1.html<form name="frmPriceMag">
    <input type="text" name="father" value="" size="30"><input type="button" onclick="GetValue()" value="set">
    </form>
    <script language="javascript">
    function GetValue()
    {
    window.open("son1.html");
    }
    </script>son1.html<a href="#" onclick="SelectItem('sss');" style="cursor:hand" value="sss">sss</a>
    <script language="javascript">
    function SelectItem(va)
    {
    objfrm=opener.document.frmPriceMag;
    objfrm.father.value=va;
    window.close();
    }
    </script>你模仿这个学习一下!应该可以实现的