| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 582 人关注过本帖
标题:非法字符判断
只看楼主 加入收藏
威龙嘉少
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
快速回复:非法字符判断
数据加载中...
 
   



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

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