我在我的WebBrowser中加载此page [可能是NSFW] 当WebBrowser.ReadyState准备就绪时,我试图在WebBrowser.Document.DomDocument,WebBrowser.Document.Body.InnerHtml,WebBrowser.Document.Body.OuterHtml中查看,但不是我在WebBrowser中看到的页面。
WebBrowser b = new WebBrowser();
b.Navigate(url);
WaitBrowserLoading(b); //wait browser to complete loading
MessageBox.Show(b.Document.Body.OuterHtml);
MessageBox.Show(b.Document.Body.InnerHtml);
当我使用Chrome对其进行分析时,后两个函数都没有返回我可以看到的页面。
有什么建议吗?
答案 0 :(得分:0)
正确的结果是在webBrowser.Document.GetElementsByTagName(" HTML")[0] .OuterHtml