WebBrowser - empty DocumentText

前端 未结 5 1035
粉色の甜心
粉色の甜心 2021-01-07 02:16

I\'m trying to use WebBrowser class, but of course it doesn\'t work.

My code:

WebBrowser browser = new WebBrowser();
browser.Navigate(\"         


        
5条回答
  •  悲哀的现实
    2021-01-07 02:39

    Try something like this

    string url = string.Empty:
    string html = "http://www.google.com/";
    string url = html;
    if (!url.StartsWith("http://") && !url.StartsWith("https://"))
    {
       url = "http://" + url;
    }
    browser.Navigate(new Uri(url)); 
    

    replace it within your While loop where necessary

提交回复
热议问题