回 帖 发 新 帖 刷新版面

主题:看一下这个验正码为什么不能验正?

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>内部人员登陆系统</title>
<style type="text/css">
<!--
body {
    background-color: #990000;
    margin-top: 0px;
}
.STYLE1 {
    font-size: 24px;
    font-weight: bold;
    font-family: "新宋体";
    color: #FFCC99;
}
.STYLE2 {font-size: 12px}
.STYLE3{color: #990000; font-size: 12px; }
.STYLE5 {color: #33CCCC}
-->
</style>

<script language="javascript">
function yan()
{
        var usernumber=document.form1.usernumber.value;
        if(document.form1.usernumber.value=="")
        {
        window.alert("帐号输入不正确,请重新输入!");
        document.form1.usernumber.focus();
        return false;
        }
        if(document.form1.usernumber.value.length !=19)
        {
        window.alert("输入的帐号位数不正确,请重新输入!");
        document.form1.usernumber.focus();
        return false;
        }
        if(isNaN(document.form1.usernumber.value))
        {
        window.alert("帐号必须全是数字、请重新输入!");
        document.form1.usernumber.focus();
        return false;
        }
        var username=document.form1.username.value;
        if(document.form1.username.value=="")
        {
        window.alert("用户名不能为空、请重新输入!");
        document.form1.username.focus();
        return false;
        }
        var password=document.form1.password.value;
        if(document.form1.password.value=="")
        {
        window.alert("密码不能为空、请重新输入!")
        document.form1.password.focus();
        return false;
        }
        if(document.form1.password.value.length < 6 || document.form1.apssword.value.length > 20)
        {
        window.alert("密码位数不正确、请重新输入!");
        document.form1.password.focus();
        return false;
        }
        var rectify=document.form1.rectify.value;
        if(document.from1.rectify.value=="")
        {
        window.alert("管理验证码不能为空、请重新输入!");
        document.form1.rectify.focus();
        return false;
        }
}
</script>

</head>

<body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><form id="form1" name="form1"  onsubmit="return yan()" method="post" action="admin_loging.asp?action=yes">
      <table width="304" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="4" align="center" valign="bottom" class="STYLE1">内部高级管理员登陆系统</td>
          </tr>
        <tr>
          <td width="66" align="center" valign="middle" class="STYLE2">高级管理员</td>
          <td colspan="2" align="left" valign="middle"><label>
            <input name=usernumber class="STYLE3" style="WIDTH: 140px; HEIGHT: 12px" 
            size="11" maxlength="20" onMouseOver="this.style.background='#E1F4EE'"; onMouseOut="this.style.background='#33CCCC'" onFocus="this.select(); ">
          </label></td>
          <td width="93">&nbsp;</td>
        </tr>
        <tr>
          <td align="center" valign="middle" class="STYLE2">用&nbsp;&nbsp;户&nbsp;&nbsp;名</td>
          <td colspan="2" align="left" valign="middle"><label>
            <input name=username type="rext" class="STYLE3" style="WIDTH: 140px; HEIGHT: 12px" 
            size="11" maxlength="20" onmouseover="this.style.background='#E1F4EE'"; onmouseout="this.style.background='#33CCCC'" onfocus="this.select(); " />
          </label></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center" valign="middle" class="STYLE2">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</td>
          <td colspan="2" align="left" valign="middle"><label>
            <input name=password type="password" class="STYLE3" style="WIDTH: 140px; HEIGHT: 12px" 
            size="11" maxlength="20" onMouseOver="this.style.background='#E1F4EE'"; onMouseOut="this.style.background='#33CCCC'" onFocus="this.select(); " >
          </label></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center" valign="middle" class="STYLE2">验&nbsp;&nbsp;正&nbsp;&nbsp;码</td>
          <td align="left" valign="middle"><label>
            <input name=rectify type="text" class="STYLE3" style="WIDTH: 50px; HEIGHT: 12px" 
            size="11" maxlength="20" onMouseOver="this.style.background='#E1F4EE'"; onMouseOut="this.style.background='#33CCCC'" onFocus="this.select(); " >
          </label></td>
          <td align="left" valign="middle"><img src="../inc/checkcode.asp"></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="right" valign="middle">&nbsp;</td>
          <td width="66" align="left" valign="middle"><label>
          <input name="Submit" type="submit" class="STYLE3" style="WIDTH: 50px; HEIGHT: 18px;" onMouseOver="this.style.background='#E1F4EE'"; onMouseOut="this.style.background='#33CCCC'" value="(提*交)" />
          </label></td>
          <td width="79" align="right" valign="middle"><input name="Submit" type="reset" class="STYLE3" style="WIDTH: 50px; HEIGHT: 18px;" onMouseOver="this.style.background='#E1F4EE'"; onMouseOut="this.style.background='#33CCCC'" value="(重*填)" /></td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <label></label>
    </form>    </td>
  </tr>
</table>
<p class="STYLE5">&nbsp;</p>
</body>
</html>

回复列表 (共2个回复)

沙发

form1写成from1去了

板凳

非常的感谢你

我来回复

您尚未登录,请登录后再回复。点此登录或注册