0

「テキストにまたがる」このコードを取得しますが、リンクhref(リンクテキストではありません)を取得したいです。お願い助けて。

   Dim html As String = "<span class=myclass><a href=abc.html>text text a text</a></span>"
   Dim doc = New HtmlAgilityPack.HtmlDocument()
   doc.LoadHtml(html)
   Dim titles As HtmlAgilityPack.HtmlNodeCollection = doc.DocumentNode.SelectNodes("//span[@class='myclass']")
   For Each title In titles
      MsgBox(title.InnerText)
   Next
4

1 に答える 1

2

_attribute の値を取得する方法を尋ねています。

title.Attributes("href").Value
于 2013-09-30T17:14:01.597 に答える