..:: 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 Duplicar e remover MC Flash & ActionScript Roberto Filho 
  • 1 Reply
  • 830 Views
New Replies scroll + caixa de texto Flash & ActionScript Neemias 
  • 3 Replies
  • 1021 Views
New Replies Claro reduz preço das mensagens de texto em mais de 80% Notícias Notícias 
  • 0 Replies
  • 214 Views
New Replies site a partir de template
Editado de acordo com regra 01ª - Conteúdo fora de contexto
Web Standards Paulo Hasse 
  • 4 Replies
  • 781 Views
New Replies Carregando TXT
com 2 textos
Flash & ActionScript mcardeal 
  • 0 Replies
  • 345 Views
New Replies links
manter a côr do texto
Dreamweaver Francis 
  • 1 Reply
  • 432 Views
New Replies texto flutuante
ao passar o mouse
Web Standards premiere 
  • 2 Replies
  • 1470 Views
New Replies Texto de um form em negrigo
fazer ele mostrar no email em negrito
PHP robertopolis 
  • 1 Reply
  • 641 Views

Publicidade




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