'得到當前browser的頁面字體內容 PublicFunction getWebContent()Function getWebContent(browser As WebBrowser) AsString Dim doc AsObject Dim i AsObject Dim strHtml AsString Set doc = browser.Document ForEach i In doc.All strHtml = strHtml &Chr(13) & i.innerText Next getWebContent = strHtml End Function上面這個函數可以得到browser中所有文字信息.
'得到當前browser的頁面Html內容 PublicFunction getWebHtml()Function getWebHtml(browser As WebBrowser) AsString Dim doc AsObject Dim i AsObject Dim strHtml AsString Set doc = browser.Document ForEach i In doc.All strHtml = strHtml &Chr(13) & i.innerHtml Next getWebHtml = strHtml End Function