| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 695 人关注过本帖
标题:请高手帮忙去掉代码内的验证码功能
只看楼主 加入收藏
zhaoyajin200
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-9-17
结帖率:0
收藏
已结贴  问题点数:20 回复次数:3 
请高手帮忙去掉代码内的验证码功能
我真的是一点都不懂ASP,没学。有个小站,但是后台现在登录不进去了,总是显示验证码输入有误,可是我明明输入的是对的啊,所以只好来坛子里请高手帮忙把验证码这个功能直接去掉。

代码如下
程序代码:
<!--#include file="../inc/conn.asp"-->
<html xmlns="http://www.>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%></title>
<style type="text/css">
<!--
@import url("style.css");
body {
    background-image: url(images/index_01.jpg);
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
body,td,th {
    font-size: 12px;
}
.height {
    height: 20px;
    width: 120px;
}
.STYLE1 {
    font-size: 14px;
    color: #FF3300;
}
-->
</style>
<SCRIPT language=JavaScript>
<!--
function recheck()
{ 
if (document.form1.username.value =="")
{
alert("请填写登陆名!");
document.form1.username.focus();
return (false); 
}
var filter=/^\s*[.A-Za-z0-9_-]{5,15}\s*$/;
if (!filter.test(document.form1.username.value)) { 
alert("登陆名填写不正确(含有非法字符),请重新填写!"); 
document.form1.username.focus();
document.form1.username.select();
return (false); 
} 
if (document.form1.password.value =="") 
{
alert("请填写密码!");
document.form1.password.focus();
return (false); 
}

var filter=/^\s*[.A-Za-z0-9_-]{5,20}\s*$/;
if (!filter.test(document.form1.password.value)) { 
alert("密码填写不正确(含有非法字符),请重新填写!"); 
document.form1.password.focus();
document.form1.password.select();
return (false); 
} 

if (document.form1.number.value==""){
alert("请输入认证码!");
document.form1.number.focus();
return (false); 
}

return true;
}
//-->
</SCRIPT>
</head>
<%
randomize timer
checknumber=left(int((rnd*9999980)+100000),6)
session("checknumber")=checknumber
%>
<body>
<table width="491" height="72" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="491" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="72">&nbsp;</td>
  </tr>
</table>
<table width="491" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/index_06.jpg" width="491" height="67" alt="" /></td>
  </tr>
</table>
<table width="491" height="168" border="0" align="center" cellpadding="0" cellspacing="0" background="images/index_07.jpg">
  <tr>
    <td><form id="form1" name="form1" method="post" action="checklogin.asp" onSubmit="return recheck(this)">
      <table width="391" height="94" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="68" height="35" class="zi">用户名:</td>
          <td width="175"><input name="username" type="text" class="height" id="username" value="" size="14" /></td>
          <td width="148" rowspan="2"><div align="center">
              <input name="submit" type="image" id="submit" src="images/dl.jpg"/>
          </div></td>
        </tr>
        <tr>
          <td height="35" class="zi">密 码:</td>
          <td><input name="password" type="password" class="height" id="password" value="" size="14" /></td>
        </tr>
        <tr>
          <td height="35" class="zi">验证码:</td>
          <td colspan="2"><input name="number" type="text" class="height" id="number" value="" size="14" /> 
            <span class="STYLE1"><%=session("checknumber")%></span></td>
        </tr>
      </table>
        </form>
    </td>
  </tr>
</table>
<table width="491" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/index_08.jpg" width="491" height="126" alt="" /></td>
  </tr>
</table>
</body>
</html>
搜索更多相关主题的帖子: 验证码 
2012-09-17 20:01
netlin
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:24
帖 子:544
专家分:4308
注 册:2012-4-9
收藏
得分:7 
添加内容(用红色字体标出):
<tr>
   <td height="35" class="zi">验证码:</td>
   <td colspan="2"><input name="number" type="text" class="height" id="number" value="<%=session("checknumber")%>" size="14" />
         <span class="STYLE1"><%=session("checknumber")%></span></td>
</tr>

如果还有问题,就要打开checklogin.asp文件来分析了。

做自己喜欢的事!
2012-09-17 23:54
bcmailesi
Rank: 2
等 级:论坛游民
帖 子:6
专家分:17
注 册:2012-9-24
收藏
得分:7 
if (document.form1.number.value==""){
alert("请输入认证码!");
document.form1.number.focus();
return (false);
}


本页这段代码也需要去掉的。
2012-09-24 09:35
G_LITTLE
Rank: 2
等 级:论坛游民
威 望:1
帖 子:3
专家分:14
注 册:2012-9-26
收藏
得分:7 
将下面一段去掉:
if (document.form1.number.value==""){
alert("请输入认证码!");
document.form1.number.focus();
return (false);
}

        <tr>
          <td height="35" class="zi">验证码:</td>
          <td colspan="2"><input name="number" type="text" class="height" id="number" value="" size="14" />
            <span class="STYLE1"><%=session("checknumber")%></span></td>
        </tr>

  打开checklogin.asp这个文件,找到验证验证码的那段去掉就OK了。。
希望能帮到你!!!
2012-09-26 16:32
快速回复:请高手帮忙去掉代码内的验证码功能
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027551 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved