[VB] VB使用WebBrowser讀取網頁內容
當前位置:點晴教程→知識管理交流
→『 技術文檔交流 』
'得到當前browser的頁面字體內容
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上面這個函數可以得到browser中所有文字信息. '得到當前browser的頁面Html內容 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 編輯過 |
關鍵字查詢
相關文章
正在查詢... |