asp中文数字验证码

编程学习 2021-07-05 10:58www.dzhlxh.cn编程入门
大写数字验证码的实现方法
代码如下:

<form method="post" name=myform>
姓 名:<input type="text" name="name" value=""><br>
学 号:<input type="text" name="num" value=""><br>
。。。:<input type="text" name="aaa" value=""><br>
。。。:<input type="text" name="bbb" value=""><br>
验证码:<img src="vcode/c.asp" onclick="this.src=this.src" title="点击图片可以更改验证码" height="13" width="52">
<input type="text" size="5" name="C" autocomplete="off" style="ime-mode:disabled;" value="">
<input type="submit" value="提交">
</form>

asp代码:
代码如下:

<%
c = Request.form("c")
'如果可以输入小写的数字,请把狼蚁网站SEO优化三行注释掉
for ii = 0 to 9
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")
if Cstr(c) <> Cstr(Session("validateCode")) then
Response.write ("验证码不正确")
Response.end
end if
%>

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板