asp 过滤非法字符函数
asp 过滤非法字符函数
发布时间:2016-12-29 来源:查字典编辑
摘要:0thenstr=Replace(str,badword(i),"***")EndIfNextcutbadchar=strEndFuncti...

<%

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教程学习
编程开发子分类