Chinese name, Social Security number, car grade (regular judgment)

Source: Internet
Author: User

<! DOCTYPE html>
<meta charset= "Utf-8" >
<meta name= "viewport" content= "initial-scale=1.0, maximum-scale=1.0, User-scalable=no"/>
<meta name= "format-detection" content= "Telephone=no" >
<meta name= "format-detection" content= "Email=no" >
<title>test</title>
<style type= "Text/css" >
ul,li{

}
</style>
<script src= "Js/jquery-1.9.1.min.js" type= "Text/javascript" charset= "Utf-8" ></script>
<body>
<form action= "" >
<ul>
<li> <label for= "" > Chinese name:</label> <input type= "text" name= "username" id= "username"/> <span class= "Beizhu" ></span></li>
<li> <label for= "" > name Pinyin:</label> <input type= "text" name= "Usertit" id= "Usertit"/> <span class= "TITBZ" ></span></li>
<li> <label for= "" > ID number:</label> <input type= "text" name= "userid" id= "userid"/> <span class = "IDSBZ" ></span></li>
<li> <label for= "" > License plate number:</label> <input name= "Carnumber" id= "Chepais" type= "text" id= "onblur=" Lostblur (); " > <span class= "carsbz" ></span></li>
</ul>
</form>
<script type= "Text/javascript" >
$ (' #username '). On (' Blur ', function () {
var username = $ (' #username '). Val ();
re =/^[\u4e00-\u9fa5]+$/;
if (username = = ") {
$ ('. Beizhu '). html (' Please enter name ');
return false;
}else if (! ( Re.test (username))) {
$ ('. Beizhu '). html (' Please enter a name in the correct format ');
return false;
} else if ((re)) {
$ ('. Beizhu '). html (');
}
});


$ (' #usertit '). On (' Blur ', function () {
var usertit = $ (' #usertit '). Val ();
re =/^[a-za-z]{4,}$/;
if (Usertit = = ") {
$ ('. Titbz '). html (' Please enter last name ');
return false;
}else if (! ( Re.test (Usertit))) {
$ ('. Titbz '). html (' Please enter the correct format of the last name ');
return false;
} else if ((re)) {
$ ('. Titbz '). html (');
}
});
$ (' #userid '). On (' Blur ', function () {
var userid = $ (' #userid '). Val ();
Regidcard =/(^\d{15}$) | (^\d{18}$) | (^\d{17} (\d| X|X) $)/;
if (UserID = = ") {
$ ('. Idsbz '). html (' Please enter your ID number ');
return false;
}else if (! ( Regidcard.test (userid))) {
$ ('. Idsbz '). html (' Please enter the correct format of the ID card ');
return false;
} else if ((Regidcard)) {
$ ('. Idsbz '). html (');
}
});
Car Grade Verification
Lost license plate number Focus Popup
function Lostblur () {
var Chepais = $ (' #chepais '). Val ();
var re_car=/^[\u4e00-\u9fa5]{1}[a-z]{1}[a-z_0-9]{5}$/;
if (Chepais = = ") {
$ ('. Carsbz '). html (' Please enter the car number ');
return false;
}else if (! ( Re_car.test (Chepais))) {
$ ('. Carsbz '). html (' Please enter the correct format of the license plate number ');
return false;
} else if ((Re_car)) {
$ ('. Carsbz '). html (' √ ');
}
}
//
</script>
</body>

Chinese name, Social Security number, car grade (regular judgment)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.