asp清除html中style,javascript,css代码
<%
function removehtml(str)
dim objregexp, match,strhtml
if isnull(str) then
str=""
end if
strhtml=str
strhtml=replace(replace(replace(strhtml,vblf,""),vbcr,""),vbcrlf,"")
set objregexp = new regexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "<script[^>]*?>.*?</script>"
strhtml = objregexp.replace(strhtml,"")
objregexp.pattern = "<style[^>]*?>.*?</style>"
strhtml = objregexp.replace(strhtml,"")
objregexp.pattern = "<. ?>"
strhtml = objregexp.replace(strhtml,"")
set objregexp = nothing
removehtml=strhtml
end function
%>