分享一段ASP表单验证代码

代码如下

"" then          p_len=len(trim(str))          for xx=1 to p_len              if asc(mid(str,xx,1))maxnum then   bymaxnum=true  else  bymaxnum=false end ifend function'最小字符数;超过返回true,否则返回false;maxnum:最大字符数,strmaxnum:字符function byminnum(minnum,strminnum) if len(strminnum)=0 then    isnotcs=true    exit function  end if    isnotcs=false nextend function'是否为非email地址;为非email地址返回true,否则返回false;判断条件:是否含有“@”function IsnotEmail(email)dim names, name, i, cIsnotEmail = falsenames = Split(email, "@")if UBound(names)  1 then   IsnotdEmail = true   exit functionend iffor each name in names   if Len(name)  2 and i  3 then   IsnotEmail = true   exit functionend ifif InStr(email, "..") > 0 then   IsnotEmail = trueend ifend function'包含非法字符;只允许英文字母,数字,"-","_","."function havespchar(strspchar)   havespchar = false   dim sp,csp   for sp = 1 to Len(strspchar)     csp = Lcase(Mid(strspchar, sp, 1))     if InStr("abcdefghijklmnopqrstuvwxyz_-.", csp) 

登录后复制<!–

分享一段ASP表单验证代码

–>

以上就是分享一段ASP表单验证代码的详细内容,更多请关注【创想鸟】其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2495230.html

(0)
上一篇 2025年3月5日 02:11:55
下一篇 2025年2月20日 05:34:40

AD推荐 黄金广告位招租... 更多推荐

发表回复

登录后才能评论