jQuery 回车事件enter使用示例


eg:
复制代码 代码如下:

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

注意:是“keydown”而不是“keypress”
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3