asp 过滤非法字符函数
更新时间:2009年02月21日 03:45:57 作者:
过滤非法字符
<%
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("中国不阿斗发射点发明")
%>
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("中国不阿斗发射点发明")
%>
相关文章
可用的ASP无重复数字随机函数, 数组实现, 并应用于随机显示记录集
可用的ASP无重复数字随机函数, 数组实现, 并应用于随机显示记录集...2007-03-03
msxml3.dll 错误 800c0019 系统错误:-2146697191解决方法
今天发现一个asp后台使用了XMLHTTP组件的页面无法无法生成静态页面了,运行时提示msxml3.dll 错误 800c0019 系统错误:-2146697191,经过搜索如下方法解决了问题2020-11-11


最新评论