ASP去掉HTML代码,显示纯文本,截取100个字符


<%
function nohtml(str)
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(\<.[^\<]*\>)"
str=re.replace(str," ")
re.Pattern="(\<\/[^\<]*\>)"
str=re.replace(str," ")
nohtml=str
set re=nothing
end function

%>


调用的语句:<%=(left((nohtml(rs_blog("文章内容"))),200))%>

新加评论 评论标题: