手机号和电话验证js

来源:互联网 发布:长春大学教务处软件 编辑:程序博客网 时间:2024/04/30 09:43
function checkTel(tel){   var mobile = /^1[2|3|4|5|6|7|8|9]\d{9}$/ , phone = /^0\d{2,3}-?\d{7,8}$/;   return mobile.test(tel) || phone.test(tel);}

0 0
原创粉丝点击