登    录

登    录

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

Detailed explanation of examples of Enter key login

零下一度
零下一度Original
2017-07-24 14:12:081821browse

  <div class="zhuce_input_ty"> <p><a id="qianlogin"  onclick="UserLogin(this);" href="javascript:void(0);" class="bottom-btn">登    录</a></p>
   </div>
  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();
}

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!

Statement:
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