您好,欢迎访问一九零五行业门户网

Asp清除html中style,javascript,css代码

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 %>
其它类似信息

推荐信息