显示数据库信息时,过滤多余的html格式(纯文本输出)

来源:互联网 发布:射频美容 知乎 编辑:程序博客网 时间:2024/06/05 16:59

 

<%
Function RemoveHTML(str)
Dim re
Set re=New RegExp
re.Pattern="<.*?>"
re.IgnoreCase=True
re.Global=True
str=re.Replace(str,"")
Set re=Nothing
RemoveHTML=str
End Function

%>

 

'显示content的内容

<%=RemoveHTML(trim(rsnews("content")))%>