Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果 dw1() 返回 webbrowser.document 我知道我可以这样做:
dw1.body.outerhtml
获取正文的outerhtml。就是这样,正文,标题等。
如果我想获取整个文档的 html 怎么办?
如果您有权访问 webbrowser 控件,则可以使用以下DocumentText属性:
DocumentText
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted MessageBox.Show(WebBrowser1.DocumentText) End Sub