JQuery simply implements email format verification, and jquery verifies email
The email verification code may be used for form submission. The code is relatively simple, that is, the judgment of the email format. If there is a difficulty, it may be about the use of regular expressions, you can query it by yourself. Here is a piece of verification code that can be used. copy and paste it.
The code example is as follows:
<Script type = "text/javascript" src = "mytest/jQuery/jquery-1.8.3.js"> </script> <script type = "text/javascript" >$ (document ). ready (function () {$ ("# bt "). click (function () {if ($ ("# email1 "). val () = "") {alert ("Mailbox cannot be blank"); return false;} var email = $ ("# email1 "). val (); if (! Email. match (/^ ([a-zA-Z0-9 _-]) + @ ([a-zA-Z0-9 _-]) + ((\. [a-zA-Z0-9 _-] {2, 3}) {1, 2}) $/) {alert ("format incorrect! Enter "); $ (" # email1 "). focus ();}})}) </script>
The above code implements simple mailbox verification, which can be used after being assigned and pasted.
The above is all the content of this article. I hope you will like it.