首页 > 代码库 > vb 去掉html中的回车和tab;转换部分html大写标签为小写
vb 去掉html中的回车和tab;转换部分html大写标签为小写
‘//去掉各种回车空格符
Public Function replaceEnter(bStr As String)
bStr = Replace(bStr, " ", "")
bStr = Replace(bStr, vbTab, "")
bStr = Replace(bStr, vbCrLf, "")
bStr = Replace(bStr, Chr(13) + Chr(10), "")
bStr = Replace(bStr, Chr(13), "")
bStr = Replace(bStr, Chr(10), "")
replaceEnter = bStr
End Function
‘//网页标签改为小写
Public Function htmlLableToSmall(strHtml As String)
strHtml = Replace(strHtml, "<A", "<a")
strHtml = Replace(strHtml, "</A", "</a")
strHtml = Replace(strHtml, "<SPAN", "<span")
strHtml = Replace(strHtml, "</SPAN", "</span")
strHtml = Replace(strHtml, "<DIV", "<div")
strHtml = Replace(strHtml, "</DIV", "</div")
strHtml = Replace(strHtml, "<UL", "<ul")
strHtml = Replace(strHtml, "</UL", "</ul")
strHtml = Replace(strHtml, "<LI", "<li")
strHtml = Replace(strHtml, "</LI", "</li")
strHtml = Replace(strHtml, "<IMG", "<img")
strHtml = Replace(strHtml, "</IMG", "</img")
strHtml = Replace(strHtml, "<P", "<p")
strHtml = Replace(strHtml, "</P", "</p")
strHtml = Replace(strHtml, "<STRONG", "<strong")
strHtml = Replace(strHtml, "</STRONG", "</strong")
strHtml = Replace(strHtml, "<EM", "<em")
strHtml = Replace(strHtml, "</EM", "</em")
strHtml = Replace(strHtml, "<DL", "<dl")
strHtml = Replace(strHtml, "</DL", "</dl")
strHtml = Replace(strHtml, "<DD", "<dd")
strHtml = Replace(strHtml, "</DD", "</dd")
strHtml = Replace(strHtml, "<DT", "<dt")
strHtml = Replace(strHtml, "</DT", "</dt")
strHtml = Replace(strHtml, "<B", "<b")
strHtml = Replace(strHtml, "</B", "</b")
htmlLableToSmall = strHtml
End Function
vb 去掉html中的回车和tab;转换部分html大写标签为小写