How to Use jquery to verify that the mobile phone number is correct _ jquery

Source: Internet
Author: User
This article mainly introduces a practical case of jquery verification of mobile phone numbers. it uses regular expressions for verification. if you are interested, you can refer to the verification of mobile phone numbers, we need to know the number segment of the mobile phone number.
// Supported mobile phone numbers: 134 135 136 137 138 139 147 150 151 152 157 158 159 178 182 183 184 187 188

// China Unicom number: 130 131 132 145 155 156 176 186

// Supported by the telecom number Region: 133 153 177 180 181 189
// Mobile operator: 170

Mobile:
2G segment (GSM): 134-139, 150, 151, 152-158;
3G segment (TD-SCDMA): 157, 187, 188, 147.
China Unicom:
2G segment (GSM): 130-132, 155-156;
3G segment (WCDMA): 185, 186.
China Telecom:
Segment 2G (CDMA): 133, 153;
3G segment (CDMA 2000): 180, 189.
You can write a regular expression:Var myreg =/^ (13 [0-9] {1}) | (14 [0-9] {1}) | (17 [0] {1 }) | (15 [0-3] {1}) | (15 [5-9] {1}) | (18 [0-9] {1 })) + \ d {8}) $ /;

First introduce a JQuery framework:

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.