日期:2011-09-16  浏览次数:20901 次

以下是函数源代码:
’=========================================================
’** 函数:RemoveHref_A
’** 作用:去除字符串中所有的超级链接 
’** 作者:爱易学习网
’** 时间:2005-11-10
’** 网站:http://www.aiyiweb.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