{
$("#Text7").keydown(function (e)
{
if (e.keyCode == 13) {
alert("回车了!");
queryep_all2();
}
});
$(document).keydown(function (e) {
if (e.altKey) {
if (e.keyCode == 81) {
//q
queryep_all2();
}
else if (e.keyCode == 89) {
//y
Add_Fee();
}
else if (e.keyCode == 75) {
//k
departmentdetail.hide();
$("#Text7").focus();
}
else {
}
}
});
本文介绍了一个使用jQuery实现的简单示例,该示例通过监听特定的键盘事件来触发不同的功能,包括查询操作和费用增加等。文章展示了如何为输入框绑定回车键事件以及如何全局监听Alt+Q/Y/K组合键来执行特定任务。

被折叠的 条评论
为什么被折叠?



