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