我的需求是这样的:两个页面是父子关系,父页面A和子页面B。当B页面关闭的时候,要刷新父页面A,我用的是 B.parent.reload(); A页面是刷新了,但是刷新之前出现了IE的提示,这样显得系统很不友好,各位有什么办法不让IE出现提示吗?
谢谢~~~

解决方案 »

  1.   

    用response?reload()是不是都会出提示的,而且弄不好还会重复提交,希望楼主早日解决问题……
      

  2.   

    B.parent.reload();
    换成
    window.opener.reload()试试
      

  3.   

    我的父页面是一个查询页面,关掉子页面刷新父页面的时候相当于是重新提交查询条件,IE就会出现提示,这个js解决的了吗?
    我试了2楼说的方法,如果父页面是个简单的页面,不用交互,两个方法都行,但是一旦涉及到交互貌似就不行了。
      

  4.   

    用函数包装一下,间接调用reload方法:A.html<script>
    // reload proxy function
    function reloadProxy() {
    window.location.reload();
    }
    </script>
    <input type="button" value="Open Sub Page" onclick="window.open('B.html', '_blank', 'width=800,height=600')"/>
    <!-- indicate if page is reloaded -->
    <pre><script>
    var rnd = parseInt(Math.random() * 100);
    document.write("Page Load Flag: " + rnd);
    </script></pre>
    B.html<script>
    function closeAndReloadParent(evt, el) {
    // call proxy function to reload parent indirectly
    window.opener.reloadProxy();
    // close the window
    window.close();
    }
    </script>
    <input type="button" value="close page and reload parent" onclick="closeAndReloadParent(event, this);"/>
      

  5.   

    document.execCommand("refresh");
    document.opener.location.reload();
    window.location.reload();
    window.opener.location.reload("saletem.asp?clientid=")//vb java一样的
    document.all.id.src="asdfasdf";//刷新子业面(内嵌试的)
    这些是我当年学习javascript时候计的
    希望对美女有帮助
    要多自己去实验 经验最重要了 呵呵
    你QQ多少 我给你留言了
      

  6.   

    试下parent.location = parent.location;这样做假如父级页面提交过表单的话就不能保留打开窗口时的状态
      

  7.   

    不要使用reload,使用B.parent.location = B.parent.location;