PERSON_COD
QQ
MSN
D_CARD_NO这些东西和你表单上的INPUT的NAME一样吗?

解决方案 »

  1.   

    一样 都是一样的
    <BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
    <TABLE cellSpacing=0 cellPadding=0 width=750 align=center bgColor=#ffffff 
    border=0>
      <TBODY>
      <TR>
        <TD>
          <TABLE class=main cellSpacing=1 cellPadding=2 width=760 align=center 
          border=0>
            <FORM name=form action="reg_chk.asp" method="post">
            <TBODY>
            <TR>
              <TD colSpan=2>
                <TABLE class=main cellSpacing=0 cellPadding=0 width="100%" 
                  border=0><TBODY>
                  <TR>
                    <TD vAlign=center background=images/reg-778.gif 
                      height=28><FONT color=#000000><STRONG> 登 陆 资 
                    料</STRONG></FONT></TD></TR></TBODY></TABLE></TD></TR>
            <TR>
              <TD width=147 bgColor=#efefef>
                <DIV align=right><STRONG><FONT color=#ff0000>* 
                </FONT></STRONG>用户名:</DIV></TD>
              <TD bgColor=#efefef><INPUT name=PERSON_CODE id="PERSON_CODE" size=25 maxLength=15> </TD></TR>
      

  2.   

    <TR>
              <TD bgColor=#efefef>&nbsp;</TD>
              <TD bgColor=#efefef><FONT 
                color=#0000ff>4-16位;只限阿拉伯数字和英文字母,不区分大小写</FONT><FONT 
                color=#666666><BR>
                建议使用方便记忆。</FONT></TD>
            </TR>
            <TR>
              <TD bgColor=#efefef>
                <DIV align=right><STRONG><FONT color=#ff0000>*</FONT></STRONG> 
                登陆密码:</DIV></TD>
              <TD bgColor=#efefef><INPUT 
                name=PASSWD type=password id="PASSWD" size=25 maxLength=15> </TD></TR>
            <TR>
              <TD bgColor=#efefef>&nbsp;</TD>
              <TD bgColor=#efefef>4-16位;只限阿拉伯数字和英文字母,不区分大小写<FONT 
                color=#666666>&nbsp;</FONT><FONT 
                color=#666666><BR>
                  建议为字母和数字结合,便于记忆,但不易被猜出;</FONT></TD></TR>
            <TR>
              <TD bgColor=#efefef>
                <DIV align=right><STRONG><FONT color=#ff0000>*</FONT></STRONG> 
                确认密码:</DIV></TD>
              <TD bgColor=#efefef><INPUT name=REPASSWD type=password id="REPASSWD" size=25> 
              <FONT 
                color=#666666>(再次输入密码)</FONT> </TD></TR>
            <TR>
              <TD colSpan=2>
                <TABLE class=main cellSpacing=0 cellPadding=0 width="600%" 
                  border=0><TBODY>
                  <TR>
                    <TD background=images/reg-778.gif height=28><FONT 
                      color=#ffffff> </FONT><STRONG>联系人信息</STRONG> 
                </TD></TR></TBODY></TABLE></TD></TR>
            <TR>
              <TD bgColor=#efefef colSpan=2>
                <DIV align=center><FONT color=#ff0000>联系人信息将在网站显示,请完整填写并注意更新。 
            </FONT></DIV></TD></TR>
            <TR>
              <TD bgColor=#efefef>
                <DIV align=right><STRONG><FONT color=#ff0000>*</FONT></STRONG> 
                姓名:</DIV></TD>
     <TD bgColor=#efefef><INPUT name=PERSON_CNAME id="PERSON_CNAME" size=25 maxLength=30> <input name="sex" type="radio" value="男" checked>
       男 
         <input type="radio" name="sex" value="女">
         女
              </TR>
            <TR>
              <TD bgColor=#efefef>
                <DIV align=right><STRONG><FONT color=#ff0000>*</FONT></STRONG> 
                生日:</DIV></TD>
              <TD bgColor=#efefef> 
                <select name="Year" id="Year">
    <%
    For i = 1950 to Year(Date)-5
      Response.Write"<option>"&i&"</option>"
      Next
      %>
                </select>
                年
                <select name="Month" id="Month">
    <%
    For i = 1 to 12
      Response.Write"<option>"&i&"</option>"
      Next
    %>
                </select>
                月
                <select name="Day" id="Day">
    <%
    For i = 1 to 31
      Response.Write"<option>"&i&"</option>"
      Next
    %>
                </select>
                日&nbsp;&nbsp;            </TD>
            </TR>
            <TR>
              <TD bgColor=#efefef>
                <DIV align=right><STRONG><FONT color=#ff0000>*</FONT></STRONG> 电子邮箱:</DIV></TD>
          >
      

  3.   

    你的页面没有触发verfy()方法,所以没有验证,可以在提交的button上面调用verfy()方法
      

  4.   

    你的function verfy()
    在哪调用的.
    应该在提交的时候加上<input type="button" name="提交" onclick="verfy()">
      

  5.   

    <input type="submit" name="Submit" value="注册" onclick="verfy()">我加上了啊 可是还不好使啊 这是怎么回事呢?告诉告诉我啊 谢谢了
      

  6.   

    应该是你的{}不对应引起的
    <script language="JavaScript">
       function verfy()
       {
         if (document.form.PERSON_CODE.value == "")
          {
        alert("请您填写连线名称。");
        document.form.PERSON_CODE.focus();
        return (false);
          }
         if (document.form.PASSWD.value == "")
          {
        alert("请您填写密码。");
        document.form.PASSWD.focus();
        return (false);
          }
         if (document.form.PASSWD.value.length <4)
          {
        alert("您填写的密码太短。");
        document.form.PASSWD.focus();
        return (false);
          }
         if (document.form.REPASSWD.value == "")
          {
        alert("请您填写确认密码。");
        document.form.REPASSWD.focus();
        return (false);
          }
         if (document.form.REPASSWD.value != document.form.PASSWD.value )
          {
        alert("两次输入的密码不一致。");
        document.form.PASSWD.focus();
        return (false);
          }
         
         if (document.form.PERSON_CNAME.value == "")
          {
        alert("请您填写本人名称。");
        document.form.PERSON_CNAME.focus();
        return (false);
          }
         if (document.form.EMAIL.value == "")
          {
        alert("请您填邮箱地址。");
        document.form.EMAIL.focus();
        return (false);
          }
         if (document.form.ID_CARD_NO.value.length !=15 && document.form.ID_CARD_NO.value.length !=18)
          {
        alert("请您输入15位或18位的身份证号。");
        document.form.ID_CARD_NO.focus();
        return (false);
          }
         if (document.form.MSN.value == "")
          {
        alert("请您填写MSN。");
        document.form.MSN.focus();
        return (false);
          }
         if (document.form.QQ.value == "")
          {
        alert("请您填写QQ。");
        document.form.QQ.focus();
        return (false);
          }
    return (true);
    }
    </script>
      

  7.   

    为什么现在他可以验证了 但是出提示以后点确认他还是往下执行 还是去注册 不回到注册页面?
    以下是代码
    <script language="JavaScript">
       function verfy()
       {
         if (document.form.PERSON_CODE.value == "")
          {
        alert("请您填写连线名称。");
        document.form.PERSON_CODE.focus();
        return (false);
          }
         if (document.form.PASSWD.value == "")
          {
        alert("请您填写密码。");
        document.form.PASSWD.focus();
        return (false);
          }
         if (document.form.PASSWD.value.length <4)
          {
        alert("您填写的密码太短。");
        document.form.PASSWD.focus();
        return (false);
          }
         if (document.form.REPASSWD.value == "")
          {
        alert("请您填写确认密码。");
        document.form.REPASSWD.focus();
        return (false);
          }
         if (document.form.REPASSWD.value != document.form.PASSWD.value )
          {
        alert("两次输入的密码不一致。");
        document.form.PASSWD.focus();
        return (false);
          }
         
         if (document.form.PERSON_CNAME.value == "")
          {
        alert("请您填写本人名称。");
        document.form.PERSON_CNAME.focus();
        return (false);
          }
         if (document.form.EMAIL.value == "")
          {
        alert("请您填邮箱地址。");
        document.form.EMAIL.focus();
        return (false);
          }
         if (document.form.ID_CARD_NO.value.length !=15 && document.form.ID_CARD_NO.value.length !=18)
          {
        alert("请您输入15位或18位的身份证号。");
        document.form.ID_CARD_NO.focus();
        return (false);
          }
         if (document.form.MSN.value == "")
          {
        alert("请您填写MSN。");
        document.form.MSN.focus();
        return (false);
          }
         if (document.form.QQ.value == "")
          {
        alert("请您填写QQ。");
        document.form.QQ.focus();
        return (false);
          }
    return (true);
    }
    </script>
      

  8.   

    </TR>
            <TR bgColor=#efefef>
              <TD colSpan=4>
                <TABLE class=main cellSpacing=1 cellPadding=2 width="100%" 
                bgColor=#efefef border=0>
                  <TBODY>
                  <TR>
                    <TD align=right width=181 bgColor=#efefef><STRONG><FONT 
                      color=#ff0000>*</FONT></STRONG> 身份证号:</TD>
                    <TD width="562"><input name="ID_CARD_NO" type="text" id="ID_CARD_NO" size="18"> 
                     &nbsp;&nbsp;<span class="style1">请填写15位或18位有效身份证号  </span></TD>
                  </TR>
                  <TR>
                    <TD bgColor=#efefef>
                      <DIV align=right><STRONG></STRONG> 申请时间:</DIV></TD>
                    <TD bgColor=#efefef><INPUT name=APPLY_DATE id="APPLY_DATE" size=25 maxLength=200>                    </TD>
                  </TR>
                  <TR>
                    <TD bgColor=#efefef>
                      <DIV align=right><STRONG></STRONG> 许可时间:</DIV></TD>
                    <TD bgColor=#efefef><INPUT name=PERMIT_DATE id="PERMIT_DATE" size=25 maxLength=200>                    </TD>
                  </TR>
                  <TR>
                    <TD bgColor=#efefef>
                      <DIV align=right><STRONG></STRONG> 有效标记:</DIV></TD>
                    <TD bgColor=#efefef><input name=VALID_FLAG id="VALID_FLAG" size=25 maxlength=200></TD>
                  </TR>
                  <TR>
                    <TD bgColor=#efefef>
                      <DIV align=right><STRONG><FONT color=#ff0000>*</FONT></STRONG> MSN:</DIV></TD>
                    <TD bgColor=#efefef><INPUT name=MSN id="MSN" size=15 maxLength=200>                    </TD>
                  </TR>
                  <TR>
                    <TD align=right bgColor=#efefef>QQ:</TD>
                    <TD>
                      <TABLE class=main cellSpacing=0 cellPadding=0 width="100%" 
                      border=0>
                        <TBODY>
                        <TR>
                          <TD><input name="QQ" type="text" id="QQ" size="15">                        <INPUT style="DISPLAY: none" maxLength=8 size=8 
                            value=86 name=J_z_Z_FaxCountry>                      </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
            <TR>
              <TD bgColor=#efefef>
                <DIV align=right><STRONG></STRONG> 格言:</DIV></TD>
              <TD colspan="3" bgColor=#efefef><INPUT name=MAXIM id="MAXIM" size=10 maxLength=6>
              </TD>
            </TR>
            <TR>
              <TD bgColor=#efefef><DIV align=right><STRONG><FONT color=#ff0000>* </FONT></STRONG>照片:</DIV></TD>
              <TD width="213" bgColor=#efefef><label><input name="PHOTO" type="text" class="input_text" id="PHOTO" size="30">
              </label></TD>
              <TD width="342" bgColor=#efefef><iframe name=ad src="upme4.htm" 
    frameborder=0 width="100%" scrolling=no height=20></iframe></TD>
              <TD width="2" bgColor=#efefef>&nbsp;</TD>
            </TR>
            <TR bgcolor="#efefef">
              <TD bgColor=#efefef>
                <DIV align=right><STRONG></STRONG> 备注:</DIV></TD>
              <TD colspan="3" bgColor=#efefef><textarea name="REMARK" cols="30" rows="8" id="REMARK"></textarea></TD>
            </TR>
            <TR>
              <TD colSpan=4>
                <TABLE class=main cellSpacing=0 cellPadding=0 width="600%" 
                  border=0><TBODY>
                  <TR>
                    <TD background=images/reg-778.gif height=28><STRONG> 公 
                      司 信 息</STRONG></TD></TR></TBODY></TABLE></TD></TR>
            <TR>
              <TD width=182 bgColor=#efefef>
                <div align="right"><STRONG><FONT color=#ff0000>*</FONT></STRONG> 
                  公司所属区域:</div></TD>
              <TD colspan="3" bgColor=#efefef><select name="DISTRICT_CODE" id="DISTRICT_CODE">
                <option selected>由经理填写</option>
                        </select></TD></TR>
            <TR>
              <TD bgColor=#efefef><div align="right"><STRONG><FONT color=#ff0000>*</FONT></STRONG> 所在部门:</div></TD>
              <TD colspan="3" bgColor=#efefef><select name="DEPT_CODE" id="DEPT_CODE">
                <option selected>由经理填写</option>
                        </select></TD>
            </TR>
            <TR>
              <TD bgColor=#efefef><div align="right">办公地址:</div></TD>
              <TD colspan="3" bgColor=#efefef><input type="text" name="textfield"></TD>
            </TR>
            <TR>
              <TD bgColor=#efefef><div align="right"></div></TD>
              <TD colspan="3" bgColor=#efefef>            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="submit" name="Submit" value="提交" onclick="verfy()">            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="reset" name="Submit" value="重置"> </TD></TR>
            </FORM>
      

  9.   

    表单部分
    <FORM name=form action="reg_chk.asp" method="post"  onsubmit="return verfy(this)" >
    <input type="submit" name="Submit" value="提交" >函数部分
    function verfy(theform)
       {
         if (theform.PERSON_CODE.value == "")
          {
        alert("请您填写连线名称。");
        theform.PERSON_CODE.focus();
        return (false);
          }
         if (theform.PASSWD.value == "")
          {
        alert("请您填写密码。");
        theform.PASSWD.focus();
        return (false);
          }
    ................
         return (true);
    }
    </script>
    应该可以的