新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

asp获取a连接,获取代码中的链接地址,asp截取文本连接地址。

VbScript code

创新互联建站-专业网站定制、快速模板网站建设、高性价比石河子网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式石河子网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖石河子地区。费用合理售后完善,10年实体公司更值得信赖。

'==================================================

'*函数名 : GetHrefFromContent

'*参数说明 : html asp截取文本连接地址。

'*功能简介 : 获取代码中的链接地址

'==================================================

function GetHrefFromContent(html)

Dim Re, match, matchs,strContent,aryNum,aryContent,strUrl

strContent = ""

set Re = new RegExp

re.IgnoreCase =True

re.Global = True

re.pattern = ")|>)(.*?)"

Set matchs = re.Execute(html)

for each match in matchs

'match.SubMatches(0) 基本 0 可改成数组里的其它成员

strContent = strContent + (match.SubMatches(0)) & "|$|"

next

set matchs = nothing

aryContent = split(strContent,"|$|")

for aryNum = Lbound(aryContent) to Ubound(aryContent)

strUrl = aryContent(aryNum) '连接地址

next

end function

asp网站建设的截取连接地址功能,你学会了吗?


当前文章:asp获取a连接,获取代码中的链接地址,asp截取文本连接地址。
文章地址:http://www.wjwzjz.com/article/sccdcp.html
在线咨询
服务热线
服务热线:028-86922220
TOP