网上说这个方法在浏览器加载文档完成后 可以得到js加载的数据 好像不行 大家帮忙看看 哪里出了问题
private void PrintHelpPage()
{
// Create a WebBrowser instance.
WebBrowser webBrowserForPrinting = new WebBrowser();
// Add an event handler that prints the document after it loads.
webBrowserForPrinting.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(PrintDocument);
// Set the Url property to load the document.
webBrowserForPrinting.Url = new Uri("http://rate.taobao.com/user-rate-UMCkWvCIyvCcy.htm?spm=a220o.1000855.d4918101.2.SvdDdK&qq-pf-to=pcqq.c2c");
}
private void PrintDocument(object sender, WebBrowserDocumentCompletedEventArgs e)
{
//MessageBox.Show("000");
//MessageBox.Show();//不可以用InnerItem
// Print the document now that it is fully loaded.
//((WebBrowser)sender).Print();
// Dispose the WebBrowser now that the task is complete. ((WebBrowser)sender).Dispose();
richTextBox1.Text = ((WebBrowser)sender).Document.GetElementById("relalist").InnerHtml;
}