我们存储在数据库中的内容是HTML格式的,但是有时候我们需要无格式的显示这内容,这是用实现的过滤。
复制代码 代码如下:
%
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
%>
您可能感兴趣的文章:- HTML标签及ASP函数速查表
- ASP.NET使用屏蔽垃圾信息
- ASP技巧
- ASP 常用的几种方法(execute、test、replace)
- ASP超级链接和HTML函数 修正版
- asp 使用替换word中的标签,转为纯文本
- asp.net删除指定的HTML标签的代码
- asp使用详解
- asp的RegExp对象功能用法[比较全]
- 速查表(ASP.NET)
- asp自动补全html标签自动闭合()
- ASP清除HTML指定标签的方法