读取WebBrowser中所有超链接:https://lcx.cc/post/579/

VB提取WebBrowser所有超链接标题:

Dim AllCode As String, I As Integer, KeyTmp As String
If WebBrowser1.ReadyState = READYSTATE_COMPLETE Then
    Set AllCode = WebBrowser1.Document.getElementsByTagName("a")
    For I = 0 To AllCode.length - 1
        DoEvents '转让控制权防止假死
        If Len(AllCode(I).innerText) <> 0 Then KeyTmp = KeyTmp & AllCode(I).innerText & vbCrLf
    Next
End If