【发布时间】:2012-05-27 03:51:40
【问题描述】:
我知道当keypress 事件发生时,我们可以访问对象的事件属性keycode 按下了哪个键,但我需要知道如何通过jQuery 处理keypress 组合,例如ctrl + D ..等等?
在以下代码中,我尝试执行以下操作:
$(document).on("keypress", function(e) {
if( /* what condition i can give here */ )
alert("you pressed cntrl + Del");
});
【问题讨论】:
-
看看这个:stackoverflow.com/questions/10655202/… 在旁注...更喜欢我的回答(呵呵)
标签: javascript jquery