处理 IE 浏览器中的 ctrl + key 事件 [英] handling ctrl + key event in IE browser

查看:30
本文介绍了处理 IE 浏览器中的 ctrl + key 事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 flex 应用程序中使用热键 (Ctrl+key).当我的应用程序在 IE 中运行时出现问题.当我按 Ctrl+D 时,我会看到 IE 的添加收藏夹"窗口.

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.

推荐答案

在您的事件处理程序中,尝试

In your event handler, try

event.returnValue = false;

请参阅此 SO 线程:event.preventDefault() 函数不能在 IE 中工作

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

这篇关于处理 IE 浏览器中的 ctrl + key 事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆