我想获得href值" /contact.php"
<a href="/contact.php">Contact</a>
For Each a In wb.Document.GetElementsByTagName("a")
If a.InnerHtml = "Contact" Then
'getting the href value
End If
Next
答案 0 :(得分:2)
尝试使用
Dim value As String = a.GetAttribute("href");