在截取字符长度由于样式表格一些原因可能会使页面变形,这个时候必须先把html代码全部过滤掉。以下是asp去所有的html的代码
<%
Function RemoveHTML_A(strText)
    Dim nPos1
    Dim nPos2
    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_A = strText 
End Function
%>