屏蔽IE弹出"您查看的网页正在试图关闭窗口,是否关闭此窗口"的方法

版权声明:网上学习笔记,共享。 https://blog.csdn.net/qq_37346607/article/details/83269272

在IE6中范例代码如下:
window.opener= null;
window.close();

在IE7中示例代码如下:

window.opener= null;
window.open("","_self"); 
window.close();

关闭浏览器报错:

—— Scripts may close only the windows that were opened by it.

关闭当前页面js

open(location, '_self').close();

关闭 _open('bjsjwh.do?method=AddJyxm','新增检验项目',500,600) 新打开的弹窗式页面;

parent.parent.__MY_PAGE["Parent"].doQuery();
parent.parent.__selfClose(false);

 

猜你喜欢

转载自blog.csdn.net/qq_37346607/article/details/83269272