网络编程
位置:首页>> 网络编程>> Asp编程>> asp 过滤非法字符函数

asp 过滤非法字符函数

 来源:asp之家 发布时间:2011-04-07 10:39:00 

标签:asp,过滤,非法字符

 

<% 
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("中国不阿斗发射点发明") 
%>

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com