怎样去除特定的地址,或超级链接
时间:2011-10-30
来源:互联网
'====================================
'** 函数:moveHref
'** 作用:去除字符串中所有的超级链接
'====================================
Public Function moveHref (HTMLstr)
Dim n,str1,str2,str3,str4,tmpstr
tmpstr = HTMLstr
For n=1 to Ubound(Split(HTMLstr,"<area"))
str1 = Instr(HTMLstr,"<area")
str2 = Instr(str1,HTMLstr,">")
HTMLstr = left(HTMLstr,str1-1)&right(HTMLstr,len(HTMLstr)-len(left(HTMLstr,str2)))
HTMLstr = replace (HTMLstr,"</a>","")
tmpstr = HTMLstr
Next
moveHref = tmpstr
End Function
怎么样用这个函数除特定的超级链接,这个结果是一串HTML语言,想用它去掉接特定的链接,如:去除含有http://163.com的地址.
'** 函数:moveHref
'** 作用:去除字符串中所有的超级链接
'====================================
Public Function moveHref (HTMLstr)
Dim n,str1,str2,str3,str4,tmpstr
tmpstr = HTMLstr
For n=1 to Ubound(Split(HTMLstr,"<area"))
str1 = Instr(HTMLstr,"<area")
str2 = Instr(str1,HTMLstr,">")
HTMLstr = left(HTMLstr,str1-1)&right(HTMLstr,len(HTMLstr)-len(left(HTMLstr,str2)))
HTMLstr = replace (HTMLstr,"</a>","")
tmpstr = HTMLstr
Next
moveHref = tmpstr
End Function
怎么样用这个函数除特定的超级链接,这个结果是一串HTML语言,想用它去掉接特定的链接,如:去除含有http://163.com的地址.
作者: sunskyfan 发布时间: 2011-10-30
那就简单多了,2条语句:
HTMLstr = replace (HTMLstr,"http://163.com","")
HTMLstr = replace (HTMLstr,"</a>","")
给分吧
HTMLstr = replace (HTMLstr,"http://163.com","")
HTMLstr = replace (HTMLstr,"</a>","")
给分吧
作者: phuai007 发布时间: 2011-10-30
简单的就按照一楼说的那样就好了,
但是还有其他的方法!
但是还有其他的方法!
作者: wu8022 发布时间: 2011-10-30
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28