打开commonfunction.asp,找到
Function getcode()
getcode = "<img id=""vcodeImg"" src=""about:blank"" onerror=""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;"" onclick=""src='common/getcode.asp?s='+Math.random()""/>"
End Function
直接替换为:
Function getcode()
Dim code, code1, codet
Randomize
If Int(Rnd * 2 + 1) = 1 Then
codet = "+"
Else
codet = "-"
End If
Randomize
code = Int(Rnd * 100 + 1)
Randomize
code1 = Int(Rnd * 100 + 1)
If codet = "+" Then
Session("GetCode") = code + code1
getcode = code & "+" & code1 & "=?"
ElseIf code > code1 Then
Session("GetCode") = code - code1
getcode = code & "-" & code1 & "=?"
Else
Session("GetCode") = code1 - code
getcode = code1 & "-" & code & "=?"
End if
' getcode = "<img id=""vcodeImg"" src=""about:blank"" onerror=""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;"" onclick=""src='common/getcode.asp?s='+Math.random()""/>"
End Function