解决方法
- 定义一个全局变量记录window.open()打开的窗体
- 如过该变量被记录过,则先关闭该窗口,然后再次打开新窗口即可
eg:
/*记录当前打开的窗体/
var showDocContentWindow; function showCivilDocContent(docId) { if(showDocContentWindow){ // 已经打开过 showDocContentWindow.close(); // 关闭 } /**记录打开的窗体对象*/ showDocContentWindow = window.open(Global.rootPath+"/civilDocService/getImportDocument?docId="+docId,"showDocContentWindow"); }