且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

防止默认事件操作不起作用?

更新时间:2023-01-30 10:41:43

我实际上有一个网页应用程序使用CTRL快捷键正常工作,但后来决定我会聪明,并使用 accesskey 属性,并遇到IE的确切问题。

I actually had a web app working just fine with CTRL shortcut keys, but then decided I'd be clever and use the accesskey attribute, and ran into this exact issue with IE.

进入CTRL快捷键的问题是,许多应用程序中的许多应用程序(例如:剪切,复制,粘贴,选择所有)更为标准/有用。

The problem with going to CTRL shortcut keys is that many of those are more standard/useful across many applications (eg: cut, copy, paste, select all).

Ctrl + Alt是相当安全的,但需要更多的工作在用户的部分。

Ctrl+Alt is fairly safe, but requires more work on the user's part.

我倾向于尝试坚持ALT快捷方式IE不固执地坚持处理。

I tend to just try to stick to ALT shortcuts IE doesn't stubbornly insist on handling.

CTRL + A / CTRL + F的演示被成功取消:
http://jsfiddle.net/egJyT/

Demo of CTRL + A/CTRL + F being cancelled successfully: http://jsfiddle.net/egJyT/

这个答案似乎暗示不可能禁用菜单快捷方式,而不会将IE放入信息亭模式。

This answer seems to imply it isn't possible to disable the menu shortcuts without putting IE into kiosk mode.