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

【腾讯云】 爆款2核2G3M云服务器首年 61元,叠加红包再享折上折      
[公益] 地球是我家,绿化靠大家      
2024年 劳动节 012
2024年 端午节 052
2025年 元 旦 257
2025年 春 节 285
 
您现在的位置:首页 >> ASP/ASP.net >> 内容
本类新增
本类热门
asp自动补全html标签自动闭合
内容摘要: FunctioncloseHTML(strContent)DimarrTags,i,OpenPos,ClosePos,re,strMatchs,j,MatchSetre=NewRegExpre.IgnoreCase=Truere.Global=TruearrTags=Array('p','div','span','table','ul','font','b'......
FunctioncloseHTML(strContent)

DimarrTags,i,OpenPos,ClosePos,re,strMatchs,j,Match

Setre=NewRegExp

re.IgnoreCase=True

re.Global=True

arrTags=Array("p","div","span","table","ul","font","b","u","i","h1","h2","h3","h4","h5","h6")

Fori=0ToUBound(arrTags)

OpenPos=0

ClosePos=0

re.Pattern="\<"+arrTags(i)+"([^\<\>]+|)\>"

SetstrMatchs=re.Execute(strContent)

ForEachMatchinstrMatchs

OpenPos=OpenPos+1

Next

re.Pattern="\</"+arrTags(i)+"\>"

SetstrMatchs=re.Execute(strContent)

ForEachMatchinstrMatchs

ClosePos=ClosePos+1

Next

Forj=1ToOpenPos-ClosePos

strContent=strContent+"</"+arrTags(i)+">"

Next

Next

closeHTML=strContent

EndFunction

版权声明:本内容来源于网络,如有侵犯您的版权,请联系站长,本站收到您的信息后将及时处理。
上一篇:ASP中过滤UBB和Html标签

 

下一篇:asp.net正则表达式删除指定的HTML标签的代码

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