WordPress企业主题定制/开发/优化

过滤不文明字符ASP代码实例

首页 » ASP » 过滤不文明字符ASP代码实例

<%
Function badchar(str)
badstr="不文明字符列表,用|分开(因发表时不能含有那些字符,所以不能贴出。)"
badword=split(badstr,"|")
For i=0 to Ubound(badword)
If instr(str,badword(i)) > 0 then
badchar=True
Exit For
Else
badchar=False
End If
Next
End Function

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
%>

分类与标签:

ASP

, ,

相关项目

  • WordPress外贸企业主题

  • 最近更新

  • 热门标签