VbScript code
創(chuàng)新互聯(lián)建站-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價比石河子網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式石河子網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋石河子地區(qū)。費用合理售后完善,10年實體公司更值得信賴。
'==================================================
'*函數(shù)名 : GetHrefFromContent
'*參數(shù)說明 : 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 = "<a.*?href=(?:""(.*?)""|(.*?))(?:(?: .*?>)|>)(.*?)</a>"
Set matchs = re.Execute(html)
for each match in matchs
'match.SubMatches(0) 基本 0 可改成數(shù)組里的其它成員
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網(wǎng)站建設(shè)的截取連接地址功能,你學會了嗎?
網(wǎng)站標題:asp獲取a連接,獲取代碼中的鏈接地址,asp截取文本連接地址。
分享路徑:http://www.rwnh.cn/article28/sccdcp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站內(nèi)鏈、網(wǎng)站維護、靜態(tài)網(wǎng)站、關(guān)鍵詞優(yōu)化、面包屑導航、網(wǎng)站設(shè)計公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)