您正在使用 IPV4 [44.211.117.101] 访问本站,您本次已经查看了 1 页
用户名: 密 码: 验证码:     用QQ登录本站
首页 软件 编程 笑话 知识 公告 台风 日历 计算器
悟空收录网       [公益]保护绿色环境,构建和谐社会      

【腾讯云】 爆款2核2G3M云服务器首年 61元,叠加红包再享折上折      
[公益] 地球是我家,绿化靠大家      
2024年 清明节 006
2024年 劳动节 033
2025年 元 旦 278
2025年 春 节 306
 
您现在的位置:首页 >> ASP/ASP.net >> 内容
本类新增
本类热门
自动去除字符中含有html代码的几个ASP函数
内容摘要: 以下为引用的内容:Function stripHTML(strHTML)'Strips the HTML tags from strHTMLDim objRegExp, strOutputSet objRegExp = New RegexpobjRegExp.IgnoreCase = TrueobjRegExp.Global = TrueobjRegExp.......

以下为引用的内容:

Function stripHTML(strHTML)

'Strips the HTML tags from strHTML

Dim objRegExp, strOutput

Set objRegExp = New Regexp

objRegExp.IgnoreCase = True

objRegExp.Global = True

objRegExp.Pattern = "<.+?>"

'Replace all HTML tag matches with the empty string

strOutput = objRegExp.Replace(strHTML, "")

'Replace all < and > with < and >

strOutput = Replace(strOutput, "<", "<")

strOutput = Replace(strOutput, ">", ">")

stripHTML = strOutput 'Return the value of strOutput CHINAZ

Set objRegExp = Nothing

End Function

以下为引用的内容:

Public Function Replacehtml(Textstr)

Dim Str,re

Str=Textstr

Set re=new RegExp

re.IgnoreCase =True

re.Global=True

re.Pattern="<(.[^>]*)>"

Str=re.Replace(Str, "")

Set Re=Nothing

Replacehtml=Str

End Function

CHINAZ

以下为引用的内容:

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

CHINAZ

以下为引用的内容:

Function stripHTML(strHTML)

'Strips the HTML tags from strHTML

Dim objRegExp, strOutput

Set objRegExp = New Regexp

objRegExp.IgnoreCase = True

objRegExp.Global = True

objRegExp.Pattern = "<.+?>"

'Replace all HTML tag matches with the empty string

strOutput = objRegExp.Replace(strHTML, "")

'Replace all < and > with < and >

strOutput = Replace(strOutput, "<", "<")

strOutput = Replace(strOutput, ">", ">")

CHINAZ

stripHTML = strOutput 'Return the value of strOutput

Set objRegExp = Nothing

End Function

版权声明:本内容来源于网络,如有侵犯您的版权,请联系站长,本站收到您的信息后将及时处理。
上一篇:动态网页技术ASP日期和时间函数示例

 

下一篇:asp中实现replace不区分大小写的替换方法

发布日期:2021/6/15
手机扫二维码直达本页
发布时间:12:34:56
点  击:11
录  入:壹家怡园
相关文章
Baidu
YiJiaCMS 7.3.8 build231228(MSSQL) 闽ICP备05000814号-1
本空间由腾讯云(轻量应用服务器)提供,Cloudflare提供加速防护
运行时间载入中.....