当前位置:Gxlcms > JavaScript > jQuery 回车事件enter使用示例

jQuery 回车事件enter使用示例

时间:2021-07-01 10:21:17 帮助过:9人阅读

eg:
代码如下:

//点击enter,用户登陆
$("#txtLoginPwd").keydown(function (e) {
if (e.which == 13) {
UserLogin();
}
});

注意:是“keydown”而不是“keypress”

人气教程排行