我是新手 才学Java不长时间 呵呵 说的不一定对
纯属学习 发表一下自己的看法
建立一个11位的数组
用带返回值的方法
String yiDong(){
if(a[0]=1,a[1]=3,a[1]=4){
return "移动";
}
}
后面以次类推
构造也需要用

解决方案 »

  1.   

    function matches()
        {
    var regex = /^1[35][4-9]\d{8}(,1[35][4-9]\d{8})*$/;
    if(document.getElementById("in1").value.match(regex))
    {
        return true;
    }else
    {
        return false;
      }       
        }判断的函数 可以根据你的要求对应其onsubmit或者onclick事件
      

  2.   

    <script>function matches()
    {
    var regex = /^1[35][4-9]\d{8}(,1[35][4-9]\d{8})*$/;
    if(document.getElementById("in1").value.match(regex) || document.getElementById("in1").value == "")
    {
        return true;
    }else
    {
    alert("错误");
        return false;
     }       
     }</script>
    <form onsubmit="return matches();" action="test.jsp">
    <input type="text" id="in1" >
    <input type="submit">
    </form>简单的例子 自己研究一下