您现在的位置是:首页 > 电脑技术查询 > web开发

jquery提交按钮回车(enter)事件,该怎么处理

编辑:chaxungu时间:2022-10-02 23:14:17分类:web开发

jquery提交按钮回车(enter)事件
jquery提交按钮回车(enter)事件,谢谢,请代码

------解决方案--------------------
$(document).keydown(function (e) {
if (e.which == 13) {
$("#btnLogin").click();
}
});