IE 下使用window.open() 打开同一页面,第二次的时候不自动跳转解决方法

解决方法

  • 定义一个全局变量记录window.open()打开的窗体
  • 如过该变量被记录过,则先关闭该窗口,然后再次打开新窗口即可
  • eg:

    /*记录当前打开的窗体/

    var showDocContentWindow;
    function showCivilDocContent(docId) {
        if(showDocContentWindow){ // 已经打开过
            showDocContentWindow.close(); // 关闭
        }
        /**记录打开的窗体对象*/
        showDocContentWindow = window.open(Global.rootPath+"/civilDocService/getImportDocument?docId="+docId,"showDocContentWindow");
    }
    

猜你喜欢

转载自blog.csdn.net/qq_34898847/article/details/82630803