导读:这篇文章主要介绍了jQuery 回车事件enter的使用,需要的朋友可以参考下eg:代码如下: 点击enter,用户登陆$( txtLoginPwd) keydown(function (e) {if (e which == 13) {UserLogin();}});注意:是keydown ...
这篇文章主要介绍了jQuery 回车事件enter的使用,需要的朋友可以参考下
eg:
代码如下:
//点击enter,用户登陆
$("#txtLoginPwd").keydown(function (e) {
if (e.which == 13) {
UserLogin();
}
});
注意:是 keydown 而不是 keypress