首页 > 技术文章 > javascript刷新父页面的内容

leleroyn 2014-07-23 15:05 原文

适应于超级链接和弹出窗口 function RefreshParent() {     if (window.opener != null) {                               var btnSearch = window.opener.document.getElementById("btnSearch");         if (btnSearch != null && typeof (btnSearch) != "undefined") {             btnSearch.click();         }         else {             window.opener.location.href = window.opener.location.href;         }           }     window.opener = null;     window.open('', '_self');     window.close(); }

推荐阅读