Remove all tags in HTML code
The code copy is as follows:
<%
'*********************************
'Function: RemoveHTML_A(strText)
'Arguments: strText, string to be processed
'Author: Alixi
'Date: 2007/7/12
'Description: Remove all tags in HTML code
'Example: <%=RemoveHTML_A("<b>Welcome to Alixixi</b>")%>
'*********************************
FunctionRemoveHTML_A(strText)
DimnPos1
DimnPos2
nPos1=InStr(strText,"<")
DoWhilenPos1>0
nPos2=InStr(nPos1+1,strText,">")
IfnPos2>0Then
strText=Left(strText,nPos1-1)&Mid(strText,nPos2+1)
Else
ExitDo
EndIf
nPos1=InStr(strText,"<")
Loop
RemoveHTML_A=strText
EndFunction
%>
Remove all tags in HTML code
The code copy is as follows:
<%
'*********************************
'Function: RemoveHTML_B(strText)
'Arguments: strText, string to be processed
'Author: Alixi
'Date: 2007/7/12
'Description: Remove all tags in HTML code
'Example: <%=RemoveHTML_B("<b>Welcome to Alixixi</b>")%>
'*********************************
FunctionRemoveHTML_B(strText)
DimRegEx
SetRegEx=NewRegExp
RegEx.Pattern="<[^>]*>"
RegEx.Global=True
RemoveHTML_B=RegEx.Replace(strText,"")
EndFunction
%>
Remove all tags in HTML code
The code copy is as follows:
<%
'*********************************
'Function: RemoveHTML_C(strText)
'Arguments: strText, string to be processed
'Author: Alixi
'Date: 2007/7/12
'Description: Remove all tags in HTML code
'Example: <%=RemoveHTML_C("<b>Welcome to Alixixi</b>")%>
'*********************************
FunctionRemoveHTML_C(strText)
DimTAGLIST
TAGLIST=";!--;!DOCTYPE;A;ACRONYM;ADDRESS;APPLET;AREA;B;BASE;BASEFONT;"&_
"BGSOUND;BIG;BLOCKQUOTE;BODY;BR;BUTTON;CAPTION;CENTER;CITE;CODE;"&_