<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

小程序开发中判断判断手机号是否11位数字

时间:2021-11-17

function checkMobile(str) { //写一个判断函数
      
    var  re = /^1\d{10}$/    //正则表达式,这种是正则
    if (re.test(str)) {      //判断字符是否是11位数字
          $("#sj").html("手机号码格式正确");
          $("#sj").css("color","green");
    }
    else {
          $("#sj").html("手机号码格式错误");
          $("#sj").css("color","red");
    }
}
$("#tel").blur(function(){
        var str = $(this).val(); //取值
        checkMobile(str);
})
0
首页
案例
关于
联系