Private Sub Command1_Click()
Dim Doc As IHTMLDocument2
Set Doc = WebBrowser1.Document
Dim Tables As IHTMLElementCollection
Set Tables = Doc.All.tags("table")
Dim Quote As IHTMLElement
Set Quote = Tables.Item(0, 0).All.tags("TD").Item(0, 1)
MsgBox Quote.innerText
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate "Сайт"
End Sub
Private Sub Command1_Click()
Dim Doc As IHTMLDocument2
Set Doc = WebBrowser1.Document
Dim Tables As IHTMLElementCollection
Set Tables = Doc.All.tags("table")
Dim Quote As IHTMLElement
Set Quote = Tables.Item(0, 0).All.tags("TD").Item(0, 1)
MsgBox Quote.innerText
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate "C:\1.htm"
End Sub
<table>
<tr>
<td>МИша
</td>
<td>Вася
</td>
<td>Петя
</td>
</tr>
</table>
Private Sub Command1_Click()
WebBrowser1.Navigate "yandex.ru"
While WebBrowser1.ReadyState <> READYSTATE_COMPLETE
DoEvents
Wend
Dim Doc As IHTMLDocument2
Set Doc = WebBrowser1.Document
Dim Tables As IHTMLElementCollection
Set Tables = Doc.All.tags("table")
Dim Quote As IHTMLElement
Set Quote = Tables.Item(0, 0).All.tags("TD").Item(0, 1)
MsgBox Quote.innerText
End Sub
Сейчас этот форум просматривают: Google-бот, Yandex-бот и гости: 56