asp 不输出标签里内容

来源:百度知道 编辑:UC知道 时间:2024/06/06 09:11:34
如:<table width="98%" border="0" cellspacing="0" cellpadding="0" background="images/b.jpg" style="background-repeat:no-repeat">
<tr>
<td height="60" align="center" valign="bottom"> <h3 align="center" style="color:#FF0000;">豫艺种业09年新优品种展示参观掠影</h3></td>
</tr>
<tr>
<td height="32" align="center" valign="top" style="color:#999999; font-size:12px">2009-7-7 9:41:49  浏览量:382</td>
</tr>
<tr>

想要的输出结果是:豫艺种业09年新优品种展示参观掠影2009-7-7 9:41:49 浏览量:382
就是等输出后查看源代码是输出标签外的内容。也就是只看到:豫艺种业09年新优品种展示参观掠影2009-7-7 9:41:49 浏览量:382。

Function DelHtml(Str1)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "(<[^>]*?>)"
regEx.Global = True
regEx.IgnoreCase = True
DelHtml = replace(regEx.Replace(""&str1,"")," ","")
End Function

<%=DelHtml(rs("有标签内容的字段"))%>