知识库

去除字符串中所有的超级链接

来源: 本站    类别: 知识库    日期: 2013/10/7

 以下是函数源代码:
’=========================================================
’** 函数:RemoveHref_A
’** 作用:去除字符串中所有的超级链接 
’** 作者:cnhww
’** 时间:2005-11-10
’** 网站:http://www.cnhww.com/ 
’=========================================================
Function RemoveHref_A(HTMLstr)
Dim n,str1,str2,str3,str4
HTMLstr = Lcase(HTMLstr)
For n=1 to Ubound(Split(HTMLstr,"<a"))
str1 = Instr(HTMLstr,"<a")
str2 = Instr(str1,HTMLstr,">")
HTMLstr = left(HTMLstr,str1-1)&right(HTMLstr,len(HTMLstr)-len(left(HTMLstr,str2)))
HTMLstr = replace (HTMLstr,"</a>","")
RemoveHref_A = HTMLstr
Next
End Function

相关文章


Copyright © 2004 - 2024 CNHWW Inc. All Rights Reserved
石家庄市征红网络科技有限公司版权所有 邮政编码:050051
服务电话:0311-85315152 13931185013 在线客服QQ:81447932 / 81447933 邮箱: cnhww@163.com