cell的超链接为这种格式:
<a href="#" class="a1" onclick="javascript:window.open('address','','top=100,left=150,resizable=no,scrollbars=yes,menubar=no,width=620,height=470');return false;">请问我如何得到'address'部分? Dim a
For Each a In WebBw.Document.All
If UCase(a.tagName) = "A" Then
Debug.Print a.herf
End If
Next这种方法可以吗?现在我想要的links均在同一table的一列上,如何能通过cells的属性得到其alink?
<a href="#" class="a1" onclick="javascript:window.open('address','','top=100,left=150,resizable=no,scrollbars=yes,menubar=no,width=620,height=470');return false;">请问我如何得到'address'部分? Dim a
For Each a In WebBw.Document.All
If UCase(a.tagName) = "A" Then
Debug.Print a.herf
End If
Next这种方法可以吗?现在我想要的links均在同一table的一列上,如何能通过cells的属性得到其alink?
i = 0
For Each obT In WebBrowser1.Document.body.children
If UCase(obT.tagname) = "TABLE" Then
For Each obR In obT.Rows
For Each obC In obR.Cells(i).children
If UCase(obC.tagname) = "A" Then
s = s & obC.onclick & Chr(10)
End If
Next
Next
End If
Next
MsgBox s