如何抑制IE9 window.close()确认消息 [英] How to suppress IE9 window.close() confirm message

查看:131
本文介绍了如何抑制IE9 window.close()确认消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用window.close函数后,IE9会引发您正在查看的网页正在尝试关闭...消息。有没有办法在不更改应用程序代码的情况下抑制此消息,而是更改某些特定于IE的注册表项?

After applying the window.close function IE9 raises the "The webpage you are viewing is trying to close ..." message. Is there a way to suppress this message without changing the application code, but by changing some IE-specific registry entries instead?

推荐答案

如果窗口没有被脚本打开,IE不允许关闭窗口而不确认

你可以尝试这个...


窗口。 open('','_ self','');

window.close();

IE doesnt allow to close the window without confirmation if the window was not opened by script
U can try this ...
window.open('', '_self', '');
window.close();

这篇关于如何抑制IE9 window.close()确认消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆