asp 過(guò)濾非法字符函數(shù)
更新時(shí)間:2009年02月21日 03:45:57 作者:
過(guò)濾非法字符
<%
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("中國(guó)不阿斗發(fā)射點(diǎn)發(fā)明")
%>
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("中國(guó)不阿斗發(fā)射點(diǎn)發(fā)明")
%>
相關(guān)文章
可用的ASP無(wú)重復(fù)數(shù)字隨機(jī)函數(shù), 數(shù)組實(shí)現(xiàn), 并應(yīng)用于隨機(jī)顯示記錄集
可用的ASP無(wú)重復(fù)數(shù)字隨機(jī)函數(shù), 數(shù)組實(shí)現(xiàn), 并應(yīng)用于隨機(jī)顯示記錄集...2007-03-03
msxml3.dll 錯(cuò)誤 800c0019 系統(tǒng)錯(cuò)誤:-2146697191解決方法
今天發(fā)現(xiàn)一個(gè)asp后臺(tái)使用了XMLHTTP組件的頁(yè)面無(wú)法無(wú)法生成靜態(tài)頁(yè)面了,運(yùn)行時(shí)提示msxml3.dll 錯(cuò)誤 800c0019 系統(tǒng)錯(cuò)誤:-2146697191,經(jīng)過(guò)搜索如下方法解決了問(wèn)題2020-11-11
asp 實(shí)現(xiàn)檢測(cè)字符串是否為純字母和數(shù)字組合的函數(shù)
asp 實(shí)現(xiàn)檢測(cè)字符串是否為純字母和數(shù)字組合的函數(shù)...2007-08-08
asp利用Split函數(shù)進(jìn)行多關(guān)鍵字檢索
怎樣提取數(shù)據(jù)庫(kù)用|隔開的字!2009-09-09

