</head>
<body>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img name="admin_login_01" src="images/admin_login_01.gif" width="740" height="170" border="0" alt=""></td>
</tr>
<tr>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="740">
<tr>
<td><img name="admin_login_02" src="images/admin_login_02.gif" width="199" height="109" border="0" alt=""></td>
<td width="346" height="109" background="images/admin_login_03.gif"><table width="100%" height="97" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="admininfo" method="post" action="b2b_cadmin.asp">
<tr>
<td width="8%" align="right" height="28"><img src="images/pic2.gif" width="29" height="37"></td>
<td width="24%">管理员:<br>
<input name="admin" type="text" class="input_sr" id="admin" size="10" maxlength="15"></td>
<td width="9%"><img src="images/pic3.gif" width="29" height="37"></td>
<td width="21%">密 码: <br>
<input name="UserPassword" onkeydown=Calc.password.value=this.value onClick="password1=this;showkeyboard();this.readOnly=1;Calc.password.value=''" readOnly onchange=Calc.password.value=this.value type="Password" class="input_sr" size="10"></td>
<td width="9%"><img src="images/pic4.gif" width="29" height="37"></td>
<td width="29%">验证码:<br>
<input name=passcode type=text class="input_sr" id=passcode size="5" maxlength="4">
<img src="code.asp">
code.asp文件:
<%
Option Explicit
NumCode
Function NumCode()
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-ctrol","no-cache"
dim zNum,i,j
dim Ados,Ados1
Randomize timer
zNum = cint(8999*Rnd+1000)
Session("GetCode") = zNum
dim zimg(4),NStr
NStr=cstr(zNum)
For i=0 to 3
zimg(i)=cint(mid(NStr,i+1,1))
Next
dim Pos
set Ados=Server.CreateObject("Adodb.Stream")
Ados.Mode=3
Ados.Type=1
Ados.Open
set Ados1=Server.CreateObject("Adodb.Stream")
Ados1.Mode=3
Ados1.Type=1
Ados1.Open
Ados.LoadFromFile(Server.mappath("body.Fix"))
Ados1.write Ados.read(1280)
for i=0 to 3
Ados.Position=(9-zimg(i))*320
Ados1.Position=i*320
Ados1.write ados.read(320)
next
Ados.LoadFromFile(Server.mappath("head.fix"))
Pos=lenb(Ados.read())
Ados.Position=Pos
for i=0 to 9 step 1
for j=0 to 3
Ados1.Position=i*32+j*320
Ados.Position=Pos+30*j+i*120
Ados.write ados1.read(30)
next
next
Response.ContentType = "image/BMP"
Ados.Position=0
Response.BinaryWrite Ados.read()
Ados.Close:set Ados=nothing
Ados1.Close:set Ados1=nothing
End Function
%>
參考答案:<td width="29%">验证码:<br>
<input name=passcode type=text class="input_sr" id=passcode size="5" maxlength="4">
<img src="code.asp">
把这些删除了。然后在“b2b_cadmin.asp”页面里去掉相应的验证代码就行了,一般也就是:if checkcode<>session("checkcode") then response.write "验证码输入不正确。"