过滤HTML代码

来源:文书网 2.02W
  如何编写一个过滤掉HTML代码的函数

<%

过滤HTML代码

Function Filterhtml(strToFilter)

Dim strTemp

strTemp = strToFilter

While Instr(1,strTemp,"<") AND Instr(1, strTemp, ">")

strTemp = Left(strTemp, Instr(1, strTemp, "<")-1) & Right(strTemp, Len(strTemp)-Instr(1,strTemp, ">"))

WEnd

Filterhtml = strTemp

End Function

%>

热门标签