[VB] VB使用WebBrowser讀取網(wǎng)頁內(nèi)容
當(dāng)前位置:點(diǎn)晴教程→知識管理交流
→『 技術(shù)文檔交流 』
'得到當(dāng)前browser的頁面字體內(nèi)容
Public Function getWebContent()Function getWebContent(browser As WebBrowser) As String Dim doc As Object Dim i As Object Dim strHtml As String Set doc = browser.Document For Each i In doc.All strHtml = strHtml & Chr(13) & i.innerText Next getWebContent = strHtml End Function上面這個函數(shù)可以得到browser中所有文字信息. '得到當(dāng)前browser的頁面Html內(nèi)容 Public Function getWebHtml()Function getWebHtml(browser As WebBrowser) As String Dim doc As Object Dim i As Object Dim strHtml As String Set doc = browser.Document For Each i In doc.All strHtml = strHtml & Chr(13) & i.innerHtml Next getWebHtml = strHtml End Function 該文章在 2013/11/14 16:55:53 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |