asp中去除内容HTML标签的三个function函数(2)


        "PRE;Q;S;SAMP;SCRIPT;Select;SMALL;SPAN;STRIKE;STRONG;STYLE;SUB;SUP;" &_
        "TABLE;TBODY;TD;TEXTAREA;TFOOT;TH;THEAD;TITLE;TR;TT;U;UL;VAR;WBR;XMP;"

        Const BLOCKTAGLIST = ";APPLET;EMBED;FRAMESET;HEAD;NOFRAMES;NOSCRIPT;OBJECT;SCRIPT;STYLE;"

        Dim nPos1
        Dim nPos2
        Dim nPos3
        Dim strResult
        Dim strTagName
        Dim bRemove
        Dim bSearchForBlock

        nPos1 = InStr(strText, "<")
        Do While nPos1 > 0
                nPos2 = InStr(nPos1 + 1, strText, ">")
                If nPos2 > 0 Then
                        strTagName = Mid(strText, nPos1 + 1, nPos2 - nPos1 - 1)
                        strTagName = Replace(Replace(strTagName, vbCr, " "), vbLf, " ")

                        nPos3 = InStr(strTagName, " ")
                        If nPos3 > 0 Then
                                strTagName = Left(strTagName, nPos3 - 1)
                        End If


                        If Left(strTagName, 1) = "/" Then
                                strTagName = Mid(strTagName, 2)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2988.html