日期:2014-05-17  浏览次数:20945 次

asp中过滤html代码
请教,如何过滤.网页中的html
代码.
用网页文本编辑器提交的内容
.如何实显首页调用时不显示html的内容.

高手指教.  

<%=left(rs( "jsyd "),200)%>

------解决方案--------------------
<%
Function RemoveHTML( strText )
Dim RegEx

Set RegEx = New RegExp

RegEx.Pattern = " <[^> ]*> "
RegEx.Global = True

RemoveHTML = RegEx.Replace(strText, " ")
End Function
%>
<%=RemoveHTML(left(rs( "jsyd "),200))%>