|
网上找的另一中方法:
<%
Function HTML2Txt(HTMLString)
If IsNull(HTMLString) Then Exit Function
HTMLString = Replace(HTMLString, "<", "<")
HTMLString = Replace(HTMLString, ">", ">")
HTMLString = Replace(HTMLString, "'", Chr(39)) '单引号
HTMLString = Replace(HTMLString, """, Chr(34)) '双引号
HTMLString = Replace(HTMLString, " ", Chr(32)) '空格
'HTMLString = Replace(HTMLString, "", Chr(13)) '换行
HTMLString = Replace(HTMLString, "<br>", Chr(10)) '回车
If Err.Number Then
Err.Clear()
HTML2Txt = HTMLString
Exit Function
End If
HTML2Txt = HTMLString
End Function
%>
运行是提示:
Microsoft VBScript 编译器错误 错误 '800a03ea'
语法错误
/new20070415/chinacoat/detail.asp,行 357
Function HTML2Txt(HTMLString)
^
仔细看了看,好象也没什么错误 |
|