在ASP控制数字及字母输入
来源:岁月联盟
时间:2005-06-09
方法一:
str=Request("string")
temp=Server.URLEncode(str)
if str=temp then
response.write "你输入的不是英文或数字"
end if
文法二:
str=Request("string")
for i=1 to len(str)
a=mid(string,i,1)
if ((asc(a)<"0" and asc(a)>"9" ) or (asc(a)<asc("a") and asc(a)>asc("z"))) then
response.write "你输入的不是英文或数字"
end if
next i
上一篇:ASP的开发工具
下一篇:不刷新页面的情况下调用ASP