當前頁刷新父窗口後再彈出問題的解決

 document.domain = "XX.com";
        function Save() {
            alert("已成功取消!");
            var from = "<%=From%>";
            if (from == "mc") {
                var refresh = window.opener.document.getElementById("ctl00_cph_context_btnRefresh");
                refresh.click();
            }
            else {
                window.opener.location = window.opener.location;
            }

        //屏蔽關閉彈出窗口時的提示
        window.opener = null;
        window.open('', '_self');
        window.close();

 

window.opener.location.reload(true);   //true代表從服務器重新獲取,false爲從緩存中獲取,默認爲false  
  或window.opener.location.href   =   window.opener.location.href;  
  或window.operner.location.replace(window.opener.location);

 

二:DIV-iframe彈出窗口刷新父窗口

  parent.location.replace(parent.location.href);
  parent.location.href = "AutomaticallyServices.aspx";

發佈了68 篇原創文章 · 獲贊 0 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章