重宇网络公司教你如何 让ASP只输出文本
返回

重宇网络公司教你如何 让ASP只输出文本

时间:2013-1-9  编辑:邢台网络公司

<%
Function RemoveHTML( strText )'去除文档中的html函数
Dim regEx
Set regEx = New RegExp
regEx.Pattern ="(<[^>]*?>)"
regEx.Global = True'搜索全部匹配
regEx.IgnoreCase = True'是否区分大小写
RemoveHTML = replace(regEx.Replace(""&strText,""),"&nbsp;","")
End Function

set rs=conn.execute("select * from Ty_Bulletin where F_ID='1'")
if rs.eof then
response.Write "暂时没有记录!"
else
Ty_Content=left(rs("Ty_Content"),189)
end if
response.Write RemoveHTML(Ty_Content)&"……"
response.Write "&nbsp;&nbsp;&nbsp;&nbsp;[<a href=aboutus.asp class=dh2>详细</a>]"
%>


<<1>>
回顶部
分享到: