This article mainly introduces the JS verification phone number and mobile phone support +86 regular expression. Need friends can come to the reference, I hope to help you.
The code is as follows: <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=" http://www.w3.org/1999/xhtml "> <head> <title> Regular expression validation </title > <script type= "Text/javascript" src= ". /scripts/jquery-1.4.1.min.js "></script> <script type=" Text/javascript "> var Validate = { Istel:function (s) { var patrn =/^ (+?86) | ( (+86))? d{3,4}-d{7,8} (-d{3,4})? $/ if (!patrn.exec (s)) return false return true }, &N Bsp Ismobile:function (value) { var valid Atereg =/^ (+?86) | ((+86))? 1d{10}$/; return validatereg.test (value); , cellphone:function () {&NB Sp var cellphonenumber = $ ("#txtCellPhone"). Val (); if (! Validate.ismobile (CellPhoneNumber)) { alert ("Mobile number format not Correct "); return false; } else { & nbsp Alert ("Your phone number is in the correct format");   }, ; telephone:function () { var telephonenumber = $ ("#txttelePhone"). Val (); if (! Validate.istel (telephonenumber)) { alert ("Wrong phone number format" ); return false; } else { & nbsp Alert ("Your phone number format is correct"); } } </script> </head> <body> <div> <label> Please enter your mobile number (support +86): </label><input type= "text" id= "Txtcellphone"/><input type= "button" value= "Verify" onclick= " Validate.cellphone (); " /><br/> <label> Please enter the phone number (support +86): </label><input type= "text" id= "Txttelephone"/ ><input type= "button" value= "Verify" onclick= "Validate.telephone" (); " /><br/> </div> </body> </html>