How to suppress IE9 window.close() confirm message

☆樱花仙子☆ 提交于 2019-12-23 22:14:44

问题


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?


回答1:


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();



来源:https://stackoverflow.com/questions/8375679/how-to-suppress-ie9-window-close-confirm-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!