handling ctrl + key event in IE browser

戏子无情 提交于 2019-12-02 01:46:20

问题


I'm using hotkeys (Ctrl+key) in my flex application. getting problem when my app is running in IE. when I press Ctrl+D, im getting 'Add a Favorite' window of IE.

How should I override the default behaviour of the browser? if possible, give me some example.


回答1:


In your event handler, try

event.returnValue = false;

See this SO thread: event.preventDefault() function not working in IE



来源:https://stackoverflow.com/questions/2364004/handling-ctrl-key-event-in-ie-browser

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