关于C# webbrowser中documentText乱码问题

来源:互联网 发布:俯卧撑 知乎 编辑:程序博客网 时间:2024/05/15 21:09
 StreamReader sr = new StreamReader(webbrow.DocumentStream, Encoding.GetEncoding(("gbk")));          string strhtml = sr.ReadToEnd();

Mark!



用如下代码,可以获取到webbrowser加载后的全部代码,因为有些网页源代码是js后面加载的,所以我们在查看网页源代码时候并没有


webBrowser1.Document.Body.InnerHtml

0 0