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)
^
仔细看了看,好象也没什么错误作者: 瘋子愛老婆 时间: 2010-1-7 05:57
<%
Function coder(str)
Dim result,L,i
If IsNull(str) Then : coder="" : Exit Function : End If
L=Len(str) : result=""
For i = 1 to L
select case mid(str,i,1)
case "<" : result=result+"<"
case ">" : result=result+">"
case chr(34) : result=result+"""
case "&" : result=result+"&"
case chr(13) : result=result+"<br>"
case chr(9) : result=result+" "
case chr(32) : result=result+" "
case else : result=result+mid(str,i,1)
end select
Next
coder=result
End Function
%>