ASP敏感词汇过滤函数
生活随笔
收集整理的這篇文章主要介紹了
ASP敏感词汇过滤函数
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
function chkword(contents)
dim InvaildWords,InvaildWord,i
InvaildWords="詞匯1|詞匯2" '需要過濾得字符以“|”隔開,最后結束的字符必須是|
InvaildWord=Split(InvaildWords,"|")
For i=LBound(InvaildWord) To UBound(InvaildWord)-1
if InStr(contents,InvaildWord(i))>0 then
chkword=true exit forelsechkword=false
End If
next
end function
Function ChkInvaildWord(Words)
Const InvaildWords="詞匯1|詞匯1|" '需要過濾得字符以“|”隔開,最后結束的字符必須是|
ChkInvaildWord=True
InvaildWord=Split(InvaildWords,"|")
inWords=LCase(Trim(Words))
For i=LBound(InvaildWord) To UBound(InvaildWord)
If Instr(inWords,InvaildWord(i))>0 Then
ChkInvaildWord=True
Exit Function
End If
Next
ChkInvaildWord=False
End Function
總結
以上是生活随笔為你收集整理的ASP敏感词汇过滤函数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: []End of 2017OI
- 下一篇: eclipse maven jetty插