标题:非法字符判断
只看楼主
威龙嘉少
Rank: 1
等 级:新手上路
帖 子:205
专家分:0
注 册:2007-9-24
 问题点数:0 回复次数:1 
非法字符判断
if Instr(username,".")<>0 and Instr(username,"@")<>0 and Instr(username,"<")<>0 and Instr(username,">")<>0 and Instr(username,"/")<>0 and Instr(username,"\")<>0 and Instr(username,"[url=file://\\]\\")<>0[/url] and Instr(username,"//")<>0 and Instr(username,"#")<>0 and Instr(username,"'")<>0 then
 response.write "<script language='javascript'>"
 response.write "alert('您输入的用户名中含有非法字符,请检查后重新输入!');"
 response.write "location.href='javascript:history.go(-1)';"      
 response.write "</script>"
 response.end
 end if
我这样写判断是否含有非法字符不对吗?
为什么含了非法字符也一样可以提交啊,好象没什么用?
请指教下啊!
搜索更多相关主题的帖子: username Instr 字符 response 
2007-11-23 09:40
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
得分:0 
把and改成or
2007-11-23 10:39



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-187870-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.262719 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved