jQuery实现enter键登录
生活随笔
收集整理的這篇文章主要介紹了
jQuery实现enter键登录
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在登錄時,使用快捷鍵登錄時常用的方法,其中
loginReq()方法為請求登錄檢索的方法 $("#login").click(function(){loginReq();});$(document).keydown(function(){if (event.keyCode == 13) {//回車鍵的鍵值為13 console.log(111);loginReq();;}}); function loginReq(){//登錄請求的方法 var aa = $('.ww’).val(); $.ajax({url:"",type:"post",data:{parm:userName,pwd:pwd},success:function(res){console.log(res); } })}
轉載于:https://www.cnblogs.com/lvxisha/p/11003626.html
總結
以上是生活随笔為你收集整理的jQuery实现enter键登录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【知识点】Java常用类库
- 下一篇: DOM编程中,提高程序运行速度需要注意的