展会信息港展会大全

在asp中过滤非法字符的函数
来源:互联网   发布日期:2016-03-01 13:10:12   浏览:1494次  

导读:% 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 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

%>

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港