<formmethod="post"name=myform>
姓 名:<inputtype="text"name="name"value=""><br>
学 号:<inputtype="text"name="num"value=""><br>
。。。:<inputtype="text"name="aaa"value=""><br>
。。。:<inputtype="text"name="bbb"value=""><br>
验证码:<imgsrc="vcode/c.asp"οnclick="this.src=this.src"title="点击图片可以更改验证码"height="13"width="52">
<inputtype="text"size="5"name="C"autocomplete="off"style="ime-mode:disabled;"value="">
<inputtype="submit"value="提交">
</form>
asp代码:
<%
c=Request.form("c")
'如果可以输入小写的数字,请把下面三行注释掉
forii=0to9
c=Replace(c,Cstr(ii),"")
next
c=Replace(c,"零","0")
c=Replace(c,"一","1")
c=Replace(c,"二","2")
c=Replace(c,"三","3")
c=Replace(c,"四","4")
c=Replace(c,"五","5")
c=Replace(c,"六","6")
c=Replace(c,"七","7")
c=Replace(c,"八","8")
c=Replace(c,"九","9")
ifCstr(c)<>Cstr(Session("validateCode"))then
Response.write("验证码不正确")
Response.end
endif
%>
姓 名:<inputtype="text"name="name"value=""><br>
学 号:<inputtype="text"name="num"value=""><br>
。。。:<inputtype="text"name="aaa"value=""><br>
。。。:<inputtype="text"name="bbb"value=""><br>
验证码:<imgsrc="vcode/c.asp"οnclick="this.src=this.src"title="点击图片可以更改验证码"height="13"width="52">
<inputtype="text"size="5"name="C"autocomplete="off"style="ime-mode:disabled;"value="">
<inputtype="submit"value="提交">
</form>
asp代码:
<%
c=Request.form("c")
'如果可以输入小写的数字,请把下面三行注释掉
forii=0to9
c=Replace(c,Cstr(ii),"")
next
c=Replace(c,"零","0")
c=Replace(c,"一","1")
c=Replace(c,"二","2")
c=Replace(c,"三","3")
c=Replace(c,"四","4")
c=Replace(c,"五","5")
c=Replace(c,"六","6")
c=Replace(c,"七","7")
c=Replace(c,"八","8")
c=Replace(c,"九","9")
ifCstr(c)<>Cstr(Session("validateCode"))then
Response.write("验证码不正确")
Response.end
endif
%>