asp中文数字验证码
2009-04-22 10:38:45 来源:WEB开发网html代码:
<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" 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")
'如果可以输入小写的数字,请把下面三行注释掉
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
%>
- ››asp.net页面弄成伪静态页面
- ››Asp.net 中将汉字转换成拼音的方法
- ››ASP.NET及JS中的cookie基本用法
- ››ASP.NET获取MS SQL Server安装实例
- ››asp.net实现调用百度pai 在线翻译英文转中文
- ››ASP.NET页面选项进行提示判断
- ››Asp.net定时执行程序
- ››ASP.NET中利用DataList实现图片无缝滚动
- ››ASP.NET验证控件RequiredFieldValidator
- ››ASP.NET中使用System.Net.Mail发邮件
- ››ASP.NET中获取用户控件中控件的ID
- ››ASP.NET中FileBytes写成文件并存档
更多精彩
赞助商链接