<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> Verify mobile phone number ID card QQ number JS regular code </title>
<script>
/* Verify mobile phone number
*
* @parameter string $STR strings
* @return Boolean
*/
function Checkmo (str) {
China Mobile 134.135.136.137.138.139.150.151.152.157.158.159.187.188
if (Str.match (/^1 (3[4-9]|5[012789]|8[78)) d{8}$/) {
return true;}
China Unicom 130.131.132.133.155.156.185.186
else if (Str.match (/^1 (3[0-3]|5[56]|8[56)) d{8}$/) {
return true;}
China Telecom 133.153.180.189
else if (Str.match/^1 ([35]3|8[09]) d{8}$/) {
return true;}
else{
return false;
}
}
/**
* Verify ID Number
*
* @parameter string $STR strings
* @return Boolean
*/
function Checkcard (str) {
China's ID card is 15-or 18-digit
Return Str.match (/^d{15}$|^d{18}$/);
}
/**
* Verify Tencent QQ number
*
* @parameter string STR strings
* @return Boolean
*/
function Checkqq (str) {
Tencent QQ number starts from 10000
Return Str.match (/[1-9][0-9]{4,}/);
}
</script>
<body>
</body>