当前位置: 代码迷 >> ASP >> ASP中怎么判断字符串中是否包含字母和数字
  详细解决方案

ASP中怎么判断字符串中是否包含字母和数字

热度:107   发布时间:2012-02-19 19:43:39.0
ASP中如何判断字符串中是否包含字母和数字
小弟想在ASP中实现如下密码验证,只有包含了字母和数字的字符串才是有效密码,该如何做啊?请大虾指点!

------解决方案--------------------
function checks(c)
dim str,str1
str1=c
intlen=len(c)
for i=0 to intlen
str= Asc(str1)
if (str <48 or str> 57)and(str <65 or str> 90)and(str <97 or str> 122) then
checks=0
else
checks=1
end if
str1=right(c,intlen-i) '依次判断字符ASCII值
next
end function
  相关解决方案