验证手机号码格式正则表达式

验证手机号码格式正则表达式:
本章节分享一段能够验证手机号码格式的代码实例。
代码如下:

function checkMobile(num) {
  var reg = /^[1][3458][0-9]{9}$/;
  return reg.test(num);
}
var num="18300258600";
console.log(checkMobile(num));

 原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=16687

更多内容可以参阅:http://www.softwhy.com/zhengze/

猜你喜欢

转载自softwhy.iteye.com/blog/2269944