展会信息港展会大全

jQuery回车事件enter的使用
来源:互联网   发布日期:2016-01-28 12:59:38   浏览:1658次  

导读:这篇文章主要介绍了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

赞助本站

人工智能实验室

相关热词: 回车 事件 enter jQuery

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港