Home > Web Front-end > JS Tutorial > Detailed explanation of examples of Enter key login

Detailed explanation of examples of Enter key login

零下一度
Release: 2017-07-24 14:12:08
Original
1744 people have browsed it

  <div class="zhuce_input_ty"> <p><a id="qianlogin"  onclick="UserLogin(this);" href="javascript:void(0);" class="bottom-btn">登    录</a></p>
   </div>
Copy after login
  var SubmitOrHidden = function(event) {
        e = event ? event : (window.event ? window.event : null);
        if (e.keyCode == 13) {
            UserLogin();
        }
    }
    window.document.onkeydown = SubmitOrHidden;
    function UserLogin() {
        var username = UserValidate.strtrim($("#user_name").val());
        var password = UserValidate.strtrim($("#user_password").val());
        var captcha  = UserValidate.strtrim($("#user_captcha").val());
        var user_role = $("#user_role").val();
}
Copy after login

The above is the detailed content of Detailed explanation of examples of Enter key login. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template