JS Phone number Regular check--landline and mobile phone number

Source: Internet
Author: User

1, the latest phone number segment:

Mobile: 134 (except 1349) 135 136 137 138 139

147
150 151 152 157 158 159

182 183 184) 187 188

Unicom: 130 131 132
155 156
185 186
145

Telecom: 133 153 177 180 181 189

2, phone number regular:

Fixed: ([0-9]{3,4}-)? [0-9] {7,8}

Mobile: ^ ((\+?86) | ( \ (\+86\)))? (13[012356789][0-9]{8}|15[012356789][0-9]{8}|18[02356789][0-9]{8}|147[0-9]{8}|1349[0-9]{7}) $

3. Check function

functionChecktel () {varIsphone =/^ ([0-9]{3,4}-)? [0-9] {7,8}$/; varismob=/^ ((\+?86) | ( \ (\+86\)))? (13[012356789][0-9]{8}|15[012356789][0-9]{8}|18[02356789][0-9]{8}|147[0-9]{8}|1349[0-9]{7}) $/; varValue=document.getelementbyid ("SS"). Value.trim (); if(ismob.test (value) | |Isphone.test (value) {return true; }    Else{        return false; }    }

Reprint: http://www.2cto.com/kf/201409/337862.html

JS Phone number Regular check--landline and mobile phone number

Related Article

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.