asp 过滤非法字符函数asp

/ / 2016-02-05   阅读:2496
<% Function cutbadchar(str)  badstr="反|对|不|文|明|行|为"  badword=split(badstr,"|")  For i=0 to Ubound(badword)  If instr(str,badword(i)) > 0 then  str=Replace(s...
<%
Function cutbadchar(str) 
badstr="反|对|不|文|明|行|为" 
badword=split(badstr,"|") 
For i=0 to Ubound(badword) 
If instr(str,badword(i)) > 0 then 
str=Replace(str,badword(i),"***") 
End If 
Next 
cutbadchar=str 
End Function 
Response.Write cutbadchar("反对")
%>

我要评论

昵称:
验证码:

最新评论

共0条 共0页 10条/页 首页 上一页 下一页 尾页
意见反馈