手机号校验

js手机号码的校验
/**
判断字符串是否是手机号码,若是则返回true,若否则返回false
**/
function isPhone(phone){
return /^1(3\d|4\d|5\d|6\d|7\d|8\d|9\d)\d{8}$/g.test(phone);
}

转自:https://blog.csdn.net/qq_39482010/article/details/88697113

发布了108 篇原创文章 · 获赞 29 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/Gabriel_wei/article/details/99679701