js电话号码校验

        var contact_phone = $("#contact_phone").val();
        if(contact_phone && /^1[3|4|5|8]\d{9}$/.test(contact_phone)){    
        } else{
            $.messager.alert("提示","请输入正确的电话号码!");
             document.getElementById("contact_phone").focus();
             return;
        }

posted @ 2015-12-11 22:08  白金05  阅读(808)  评论(0编辑  收藏  举报