<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>移动手机</title>
<script type=text/javascript defer>
function check_keyCode()
{
if(window.event.keyCode==13)
check_SJH();
}
function check_SJH()
{
var value=document.all.sjh.value;
var space=/^135|136|137|138|139\d{8}$/
if(space.test(value))
alert("是移动号码");
else alert("非移动号码");
}
</script>
</head><body>
<input name="sjh" type=text onkeypress="check_keyCode()" value="">
<input type=button onclick=check_SJH() value="验证">
</body></html>

解决方案 »

  1.   

    function move(tel) {
    return tel + ":" + (tel.charAt(2) > 3 ? "是移动" : "非移动");
    }
    alert(move("1346671****"));
    alert(move("1336671****"));
      

  2.   

    楼上的alert(move("s346671****"));//是移动
    你的不对
      

  3.   

    >13400000000 && <13999999999
    就行了
      

  4.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>移动手机</title>
    <script type=text/javascript defer>
    function check_keyCode()
    {
    if(window.event.keyCode==13)
    {
    if(isNaN(document.all.sjh.value))
    {
      alert('手机号应为数字格式'); 
      return false;
    }
    if(document.all.sjh.value.length!=11)
    {
      alert('手机号应是11位');
      return false;
    }
    check_SJH();
    }
    }
    function check_SJH()
    {
    var value=document.all.sjh.value;
    var space=/^135|136|137|138|139\d{8}$/
    if(value==""){
    alert('号码不能为空');
    return false;}
    if(space.test(value))
    alert("是移动号码");
    else alert("非移动号码");
    }
    </script>
    </head><body>
    <input name="sjh" type=text onkeypress="check_keyCode()" value="">
    <input type=button onclick=check_SJH() value="验证">
    </body></html>
      

  5.   

    抱歉的说。。
    我以为是格式正确tel判断是否为移动。
    这样即可检查。格式 & 移动。。
    <script type="text/javascript">
    function ismove(tel) {
    return tel + ":" + (/^1[35][4-9]\d{8}$/.test(tel) ? "是移动" : "非移动");
    }
    alert(ismove("13466710209"));
    alert(ismove("15566710209"));
    alert(ismove("13366710209"));
    </script>
      

  6.   

    (/^1(3[4-9]|55)\d{8}$/.test(tel) ? "是移动" : "非移动")
      

  7.   


    有个工具软件 lasersite ,可以处理海量手机号码的。google可以搜到。
      

  8.   

    java,.net,asp,hacker技术讨论群14401742,诚招高手加入,共同讨论,共同发展。