99re热视频精品首页-99re热视频在线-99re热视频这里只有精品5-99re热线精品视频-99re热在线观看-99re热在线视频

蒙狼科技logo
設(shè)為首頁| 聯(lián)系我們
咨詢熱線: 13917498722
  您的位置: 首頁 > 網(wǎng)站資訊 > 去除html標記函數(shù)ASP VBScript

去除html標記函數(shù)ASP VBScript

發(fā)布日期:2017/8/26
'去除html標記函數(shù)內(nèi)容如下:(ASP VBScript)
Function RemoveHTML( strText )
    Dim TAGLIST
    TAGLIST = ";!--;!DOCTYPE;A;ACRONYM;ADDRESS;APPLET;AREA;B;BASE;BASEFONT;" &_
              "BGSOUND;BIG;BLOCKQUOTE;BODY;BR;BUTTON;CAPTION;CENTER;CITE;CODE;" &_
              "COL;COLGROUP;COMMENT;DD;DEL;DFN;DIR;DIV;DL;DT;EM;EMBED;FIELDSET;" &_
              "FONT;FORM;FRAME;FRAMESET;HEAD;H1;H2;H3;H4;H5;H6;HR;HTML;I;IFRAME;IMG;" &_
              "INPUT;INS;ISINDEX;KBD;LABEL;LAYER;LAGEND;LI;LINK;LISTING;MAP;MARQUEE;" &_
              "MENU;META;NOBR;NOFRAMES;NOSCRIPT;OBJECT;OL;OPTION;P;PARAM;PLAINTEXT;" &_
              "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)
                bSearchForBlock = False
            Else
                bSearchForBlock = True
            End If
            
            If InStr(1, TAGLIST, ";" & strTagName & ";", vbTextCompare) > 0 Then
                bRemove = True
                If bSearchForBlock Then
                    If InStr(1, BLOCKTAGLIST, ";" & strTagName & ";", vbTextCompare) > 0 Then
                        nPos2 = Len(strText)
                        nPos3 = InStr(nPos1 + 1, strText, "</" & strTagName, vbTextCompare)
                        If nPos3 > 0 Then
                            nPos3 = InStr(nPos3 + 1, strText, ">")
                        End If
                        
                        If nPos3 > 0 Then
                            nPos2 = nPos3
                        End If
                    End If
                End If
            Else
                bRemove = False
            End If
            
            If bRemove Then
                strResult = strResult & Left(strText, nPos1 - 1)
                strText = Mid(strText, nPos2 + 1)
            Else
                strResult = strResult & Left(strText, nPos1)
                strText = Mid(strText, nPos1 + 1)
            End If
        Else
            strResult = strResult & strText
            strText = ""
        End If
        
        nPos1 = InStr(strText, "<")
    Loop
    strResult = strResult & strText
    
    RemoveHTML = strResult
End Function





其他相關(guān)文章
  • 網(wǎng)站建設(shè)是提高銷售業(yè)績的主要來源
  • 一家好的網(wǎng)絡(luò)公司一般具備的特征是什么?
  • 掌握網(wǎng)站優(yōu)化三部曲 不斷提高網(wǎng)站的轉(zhuǎn)化率
  • 網(wǎng)站從六個方面幫助企業(yè)獲益
  • 網(wǎng)頁設(shè)計和網(wǎng)頁程序設(shè)計的理解
  • TIOBE發(fā)布8月編程語言排行榜Java第一 與第二名差距大




  • 企業(yè)網(wǎng)站后臺使用
    購物網(wǎng)站后臺使用
    網(wǎng)站產(chǎn)品圖片的處理



    農(nóng)業(yè)銀行支付
    建設(shè)銀行支付
    郵政儲蓄銀行支付



    企業(yè)網(wǎng)站建設(shè)
    整站建設(shè)
    購物網(wǎng)站



    企業(yè)網(wǎng)站建設(shè)建議
    注冊適合自己的域名
    什么是虛擬主機




    售前咨詢QQ: 838821345
    售后服務(wù)QQ: 464698733
    應急手機:13917498722


    微信掃一掃
    添加24小時微信客服


    郵箱:lang@MENGL.CN
    地址:上海寶山區(qū)城銀路555弄2號樓3樓
    ICP備案:滬ICP備12042844號-3
     滬公網(wǎng)安備:31011402002917號
    做網(wǎng)站 | 企業(yè)網(wǎng)站建設(shè) | 上海做網(wǎng)站 | 企業(yè)網(wǎng)站制作 | 做網(wǎng)站的公司 | 關(guān)于蒙狼 | 整站建設(shè) | 購物網(wǎng)站 | 企業(yè)網(wǎng)絡(luò)營銷 | 成功案例 | 加盟代理 | 在線訂單
    服務(wù)區(qū)域: 臨港新區(qū)做網(wǎng)站 徐匯做網(wǎng)站 閔行做網(wǎng)站 長寧做網(wǎng)站 虹口做網(wǎng)站 黃浦做網(wǎng)站 盧灣做網(wǎng)站 靜安做網(wǎng)站 浦東做網(wǎng)站 楊浦做網(wǎng)站 普陀做網(wǎng)站 閘北做網(wǎng)站 寶山做網(wǎng)站 嘉定做網(wǎng)站 松江做網(wǎng)站 昆山做網(wǎng)站
    Copyright 2012-2025 上海蒙狼網(wǎng)絡(luò)科技有限公司 www.zcrhy.com.cn All Rights Reserved