..:: MX Studio Fóruns ::..: Remover tags HTML do texto - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Remover tags HTML do texto

#1 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2076
  • Joined: 04-November 08

Posted 21 December 2009 - 08:24 PM

Remover tags HTML do texto

CÓDIGO
  
  
    <script LANGUAGE=VBScript>
  
    function RemoveHTML(strHTM)
    Dim strTmp, strTmp1, i, lngLen, charOne, ynWait4End
    strTmp=""
    strTmp1=CStr(strHTM)
    strTmp1 = Replace(CStr(strHTM),"<BR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)' Got To try all Cases TR Tr tr tR
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</TR>", vbCrLf)
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<TD>", " ")
    strTmp1 = Replace(strTmp,"</TD>", " ")
    strTmp = Replace(strTmp1,"<P>", vbCrLf)
    strTmp1 = Replace(strTmp,"</P>", vbCrLf)
    strTmp = Replace(strTmp1,"<P>", vbCrLf)
    strTmp1 = Replace(strTmp,"</P>", vbCrLf)
    strTmp = Replace(strTmp1,"<BR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</BR>", vbCrLf)
    strTmp = Replace(strTmp1,"<BR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</BR>", vbCrLf)
    strTmp = Replace(strTmp1,"<BR>", vbCrLf)
    strTmp1 = Replace(strTmp,"</BR>", vbCrLf)
    strTmp=""
    ynWait4End = False
    lngLen = Len(strTmp1)
    For i = 1 To lngLen
    charOne=Mid(strTmp1,i,1)
    if charOne="<" Then
    ynWait4End = True
    charOne=""
    End if
    if ynWait4End = True Then
    if charOne = ">" Then
    ynWait4End = False
    End if
    charOne = ""
    End if
    strTmp = strTmp & charOne
    next
    RemoveHTML= strTmp
    End function
    //-->
    </SCRIPT>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


Similar Topics Collapse

  Topic Forum Started By Stats Last Post Info
New Replies Botao de form em texto
???
Web Standards danrago 
  • 1 Reply
  • 747 Views
New Replies Campo de texto Input
Como formatar o texto?
Flash & ActionScript ticarp 
  • 0 Replies
  • 522 Views
Hot Topic (New) Dúvida com Internet Explorer
menu Exibir - Tamanho do texto ...
Dreamweaver adriano 
  • 14 Replies
  • 1363 Views
New Replies Como alinhar texo ao caminho
alinha texto ao Caminho no Corel
Flash & ActionScript ricardoelias 
  • 1 Reply
  • 1773 Views
New Replies mostrar texto em XML
uma ajuda
Flash & ActionScript Only Dust 
  • 0 Replies
  • 533 Views
New Replies efeito de texto
Flash
Avaliação Renato_Almeida 
  • 8 Replies
  • 1793 Views
New Replies Click counter
Tópico editado -> 01ª Regra - Conteúdo fora de contexto
Javascript / AJAX / DHTML dikri1000 
  • 1 Reply
  • 248 Views
New Replies texto cortado e propriedade transparent não valida Web Standards junaoo 
  • 3 Replies
  • 1030 Views

Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)