ASP过滤特定HTML标签函数
2007-12-22 16:07
537 查看
Function ScriptHtml(Byval ConStr,TagName,FType)
Dim Re
Set Re=new RegExp
Re.IgnoreCase =False
Re.Global=True
Select Case FType
Case 1
Re.Pattern="<" & TagName & "([^>])*>"
ConStr=Re.Replace(ConStr,"")
Case 2
Re.Pattern="<" & TagName & "([^>])*>.*?</" & TagName & "([^>])*>"
ConStr=Re.Replace(ConStr,"")
Case 3
Re.Pattern="<" & TagName & "([^>])*>"
ConStr=Re.Replace(ConStr,"")
Re.Pattern="</" & TagName & "([^>])*>"
ConStr=Re.Replace(ConStr,"")
End Select
ScriptHtml=ConStr
Set Re=Nothing
End Function
相关文章推荐
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签的几个函数
- Asp过滤指定html标签函数
- asp.net过滤HTML标签的几个函数
- asp.net过滤HTML标签,只保留换行与空格
- asp CutStrX字符串截取函数(过滤全部HTML标记)
- asp.net 过滤html标签
- ASP中过滤UBB和Html标签
- PHP 过滤html标签的函数