VB中网业转文本的代码是什么??

来源:百度知道 编辑:UC知道 时间:2024/09/22 06:48:22

用Replace函数把网页标识符替换成文本符号
如Temp = Replace(Temp, "<br>", vbNewLine)
就把"<br>"替换成了换行符了

Private Function TrimS(s As String, title As String) As String
On Error GoTo er
i = InStr(1, s, "<title>")
j = InStr(1, s, "</title>")
title = Mid(s, i + 7, j - i - 7)
Do
i = InStr(1, s, "<%")
j = InStr(1, s, "%>")
If i <= 0 Or j <= 0 Then Exit Do
s = Replace(s, Mid(s, i, j - i + 2), "")
Loop While i > 0 And j > 0

Do
i = InStr(1, LCase(s), "<script")
j = InStr(1, LCase(s), "</script>")
If i <=