首页 > 代码库 > 关于手机的,发送验证码,正则

关于手机的,发送验证码,正则

手机号验证:var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
 
//每秒减一
    var intervalObj;
    var curCount=60;
    function sendMessage(){
        intervalObj=window.setInterval(setRemainTime,1000);
    }
    function setRemainTime(){
        if(curCount==0){
            window.clearInterval(intervalObj);
            $(".zhanghaobox1 a").css("color","#ff8702");
$(".zhanghaobox1 span").css("border","1px solid #ff8702");
            $("#yanzhengma").children().html("获取验证码");
        }else{
            curCount--;
            $(".zhanghaobox1 a").css("color","#999999");
$(".zhanghaobox1 span").css("border","1px solid #999999");
            $("#yanzhengma").children().html("重新发送("+curCount+")");
        }
    }

关于手机的,发送验证码,正则