<! 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)