从HTML获取超链接 [英] Get a hyperlink from HTML

查看:102
本文介绍了从HTML获取超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我有一个html页面,在这个HTML的一个节点中,我有一个名为src的属性,这个属性是一个链接...我怎么能得到这个链接?



我的意思是:



So, I have a html page and, in one node of this HTML, i have one atribute called src and this attribute is a link... how I can get this link ?

What i mean:

<img border='0' id='image' src='/scripts/image/Telerik.Web.UI.WebResource.axd?type=rca&guid=82ca2bae-12b2-441b-b6fa-56c315c935ae'>





属性src是一个链接,我怎么能得到它的链接?

我得到的src字符串,但是,没有链接...来获取src字符串,我给这个帖子:





The attribute src is a link, how I can get the link of that ?
I get the src string, but, no the link... to get the src string, i maded this:

If doc.Body.InnerHtml.Contains("image") Then
    MessageBox.Show(doc.GetElementById("image").GetAttribute("src"))
End If





因此,''/ scripts / image / Telele.Web.UI.WebResource.axd?type = rca& amp; empid = 82ca2bae-12b2-441b-b6fa-56c315c935ae''是一个链接。 ..





So, the ''/scripts/image/Telerik.Web.UI.WebResource.axd?type=rca&amp;guid=82ca2bae-12b2-441b-b6fa-56c315c935ae'' is a link...

''/scripts/image/Telerik.Web.UI.WebResource.axd?type=rca&guid=82ca2bae-12b2-441b-b6fa-56c315c935ae''

< - 像这样,低于标准?我想知道这个链接....(hiperlink)



那么,我怎么能得到这个链接?

<- like this, undersantd ? I jsut whant to get this link.... ( the hiperlink )

So, how I can get the link ?

推荐答案





看看这里,



http://stackoverflow.com/questions/2188218/relative-paths-in-javascript- in-an-external-file [ ^ ]


这篇关于从HTML获取超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆