View Single Post
  #1   IP: 218.2.66.178
Old 2007-09-04, 04:10 PM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default 去除字符串中所有的超级链接

以下是函数源代码:
Code:
’========================================================= 
’** 函数:RemoveHref_A 
’** 作用:去除字符串中所有的超级链接  
’** 作者:阿里西西 
’** 时间:2005-11-10 
’** 网站:http://www.alixixi.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
Reply With Quote