去除asp中取出数据里的html标签

Function RemoveHTML( strText ) 
nPos1 = InStr(strText, "<")
Do While nPos1 > 0
nPos2 = InStr(nPos1 + 1, strText, ">")
If nPos2 > 0 Then
strText = Left(strText, nPos1 - 1) & Mid(strText, nPos2 + 1)
Else
Exit Do
End If
nPos1 = InStr(strText, "<")
Loop

RemoveHTML = strText
End Function

你可能感兴趣的:(html标签)