手机号校验

This commit is contained in:
58261 2018-09-22 15:17:17 +08:00
parent 0ffe00fa94
commit 0440400367

View File

@ -59,6 +59,12 @@ if(typeof(telephone) != undefined && telephone!= "" ){
alert("µç»°ºÅÂë¸ñʽ´íÎó");
return false;
}
var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
if (!myreg.test(telephone)) {
alert("µç»°ºÅÂë¸ñʽ´íÎó");
return false;
}
}
return true;
}