How to achieve jQuery carriage return login effect

This article mainly introduces how to achieve jQuery carriage return login effect, have a reference value, and friends needed can be referred to. I hope that everyone has a big gain after reading this article. Let’s take a look at you with everyone.

When you do a project login, you need to click the login button to enter the corresponding page, give the user a very bad experience, so I add the use of the Enter to implement the login.

  Login   $ (Function () {$ ('# username_txt'). FOCUS (); // User Click the button $ ("# login_btn"). click () {// Get User Name VAR UserName = $ ('# username_txt'). VAL ( ); var userpass = $ ('# userpass_txt'). Val (); if (username == "| | | Userpass ==") {alert ("Username Password is not empty!");} else { // Call the login method $ .ajax ({});}}); $ ("body"). KeyDown (Event) {if (event.keycode == "13") {// Keycode = 13 is back Car key $ ("# login_btn"). Click ();}});};                       
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment