正则判断固话 和手机号

来源:互联网 发布:淘宝专业版免费的模板 编辑:程序博客网 时间:2024/05/16 14:33
function checkTel(tel) {
            var mobile = /^1[3|5|8]\d{9}$/, phone = /^0\d{2,3}-?\d{7,8}$/;
            return mobile.test(tel) || phone.test(tel);
        }
原创粉丝点击