Dim web As System.Windows.Forms.WebBrowser = e.form.controls("webbrowser1").Basecontrol
Do Until web.ReadyState = 4
Application.DoEvents
Loop
Dim elems As object = web.Document.GetElementsByTagName("div")
For Each elem As object In elems
If elem.getattribute("classname") = "l-grid-row-cell-inner" Then
msgbox(elem.innerText)
End If
Next
我通过class,获取不到下面这文字陈晓珊,想问问该怎么改?
网页元素代码
<td id="ticketsGridArea|2|r1002|c109" class="l-grid-row-cell " style="width:80px; "><div class="l-grid-row-cell-inner" style="width:72px;height:26px;min-height:26px; text-align:center;">陈晓珊</div></td>