eval("zhuce7"  + ".style.display=\"none\";");
干嘛要这样?不用 document.getElementById("zhuce7").style.display="none";

解决方案 »

  1.   

    太多说不清楚,我就说简要的吧
    function checkIDCardNo(str)
    {
        exp=/^(\d{15})|(\d{17}[\dx])$/;
        if(str.search(exp) != -1)
        {
            return false;
        }
        return true;
    }if (checkIDCardNO(document.form_reg.P_IDCardNo.value))
     {上面的这一段写法,语法会不会有问题?我不懂啊
      

  2.   

    那就用他原来的代码
    function checkIDCardNo(str)
    {
        reg=/^(\d{15})|(\d{17}[\dx])$/;//15位的身份证号码或者18位的身份证号码(18位身份证号的最后一位可以是字母x)
        if(!reg.test("身份证号码")){
            return false;
        }else{
            return true;
        }
    }
      

  3.   

    //返回值搞反了
    function checkIDCardNo(str)
    {
        exp=/^(\d{15})|(\d{17}[\dx])$/;
        if(str.search(exp) != -1)//这里错误了,使用string.search的话照不到是-1,找到了是非-1
        {
            //return false;
    return true;
        }
        //return true;
    return false;
    }