How can I disable Alt+F4 event in IE browser?

放肆的年华 提交于 2020-01-06 13:14:04

问题


Ctrl+W and Alt+F4 command close the IE browser. I want to disable this default action. I can handle with Ctrl+W command. But I can't with Alt+F4 event. I found that Alt+Keys event(eg; Alt+Enter, Alt+Right Arrow, Alt+Left Arrow) can't to disable their default action. Is it possible to disable Alt+Key event in IE browser?


回答1:


You absolutely cannot do this with Javascript, for obvious security reasons.

If you are making a kiosk application that uses shdocvw.dll to render pages, then you have options, but you cannot from the page itself. Only the client gets to decide what to do with such keypresses, not you.



来源:https://stackoverflow.com/questions/6798363/how-can-i-disable-altf4-event-in-ie-browser

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