验证码改成 0000
我一直用这个。没有出现过问题。你也可以换成加法或者汉字验证码。论坛里都有,至于你说你找不到,那就不能怪别人了。是你自己没有用心去找,修改验证码的帖子很多。
修改前记得备份相应文件以防出错用来恢复~
具体修改方法如下
打开common文件夹下的function.asp
查找
'*************************************
'获得注册码
'*************************************
Function getcode()
getcode= "<img id=""vcodeImg"" src=""about:blank"" this.onerror=null;this.src='common/getcode.asp?s='+Math.random();"" alt=""验证码"" title=""看不清楚?换一张"" style=""margin-right:40px;cursor:pointer;width:40px;height:18px;margin-bottom:-4px;margin-top:3px;"" src='common/getcode.asp?s='+Math.random()""/>"
End Function
替换为
'*************************************
'获得注册码
'*************************************
'Function getcode()
' getcode= "<img id=""vcodeImg"" src=""about:blank"" this.onerror=null;this.src='common/getcode.asp?s='+Math.random();"" alt=""验证码"" title=""看不清楚?换一张"" style=""margin-right:40px;cursor:pointer;width:40px;height:18px;margin-bottom:-4px;margin-top:3px;"" src='common/getcode.asp?s='+Math.random()""/>"
'End Function
'*************************************
'个性验证码
'*************************************
Function getcode()
Dim Answer
Answer = "0000" '这是验证答案,可以自己设置
Session("GetCode") = Answer
getcode = "<span style=""align:center;color:red;"">" & "0000" & "</span>"'这里是提示信息0000
'中间的问题也可以自己设置
End Function
打开login.asp
查找
<label>验证码:<input name="validate" type="text" size="4" class="userpass" maxlength="4"/> <%=getcode()%></label><br/>
替换为
<label>验证码:<input name="validate" type="text" size="18" class="userpass" maxlength="18"/><br> <%=getcode()%></label><br/>
保存OK~