[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 编辑过 |
关键字查询
相关文章
正在查询... |