| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 696 人关注过本帖
标题:限制特殊字符问题???
取消只看楼主 加入收藏
ysf0181
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:55
帖 子:914
专家分:2385
注 册:2006-10-4
结帖率:76.71%
收藏
 问题点数:0 回复次数:1 
限制特殊字符问题???

Function ReplaceBadWord(g_word)
g_word=Replace(g_word," ","")
g_word=Replace(g_word,",","")
g_word=Replace(g_word,"<","")
g_word=Replace(g_word,".","")
g_word=Replace(g_word,">","")
g_word=Replace(g_word,"/","")
g_word=Replace(g_word,"?","")
g_word=Replace(g_word,";","")
g_word=Replace(g_word,":","")
g_word=Replace(g_word,"'","")
'g_word=Replace(g_word," " ","")
g_word=Replace(g_word,"[","")
g_word=Replace(g_word,"]","")
g_word=Replace(g_word,"{","")
g_word=Replace(g_word,"}","")
g_word=Replace(g_word,"\","")
g_word=Replace(g_word,"|","")
g_word=Replace(g_word,"=","")
g_word=Replace(g_word,"+","")
g_word=Replace(g_word,"-","")
g_word=Replace(g_word,"_","")
g_word=Replace(g_word,")","")
g_word=Replace(g_word,"(","")
g_word=Replace(g_word,"*","")
g_word=Replace(g_word,"^","")
g_word=Replace(g_word,"%","")
g_word=Replace(g_word,"$","")
g_word=Replace(g_word,"@","")
g_word=Replace(g_word,"!","")
g_word=Replace(g_word,"`","")
g_word=Replace(g_word,"~","")

g_word=Replace(g_word,",","")
g_word=Replace(g_word,"《","")
g_word=Replace(g_word,"。","")
g_word=Replace(g_word,"》","")
g_word=Replace(g_word,"、","")
g_word=Replace(g_word,"?","")
g_word=Replace(g_word,";","")
g_word=Replace(g_word,":","")
g_word=Replace(g_word,"‘","")
g_word=Replace(g_word,"“","")
g_word=Replace(g_word,"〔","")
g_word=Replace(g_word,"〕","")
g_word=Replace(g_word,"{","")
g_word=Replace(g_word,"}","")
g_word=Replace(g_word,"、","")
g_word=Replace(g_word,"|","")
g_word=Replace(g_word,"=","")
g_word=Replace(g_word,"+","")
g_word=Replace(g_word,"-","")
g_word=Replace(g_word,"——","")
g_word=Replace(g_word,")","")
g_word=Replace(g_word,"(","")
g_word=Replace(g_word,"×","")
g_word=Replace(g_word,"……","")
g_word=Replace(g_word,"%","")
g_word=Replace(g_word,"¥","")
g_word=Replace(g_word,"@","")
g_word=Replace(g_word,"!","")
g_word=Replace(g_word,"·","")
g_word=Replace(g_word,"~","")


g_word=Trim(Replace(g_word,")",""))
ReplaceBadWord=g_word
End Function

红色的为什么不行,, " 这个字符有什么可以限制输入呢???

搜索更多相关主题的帖子: 字符 Replace word 
2007-01-17 16:47
ysf0181
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:55
帖 子:914
专家分:2385
注 册:2006-10-4
收藏
得分:0 
我试了下,行。。。但是为什么这样就行了?

ASP讨论QQ群:251346273
2007-01-17 17:04
快速回复:限制特殊字符问题???
数据加载中...
 
   



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

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