C#|C# webbrowser判断页面是否加载完毕

private void Form1_Load(object sender, EventArgs e) { webalipay.Url = new Uri("https://authzth.alipay.com/login/homeB.htm"); webalipay.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted); //加载完成后的事件 } /// /// 页面加载完事件 /// /// /// private void wb_DocumentCompleted(object sender, EventArgs e) { //这个就是当网页载入完毕后要进行的操作 hdoc = webalipay.Document; HtmlElement imgcode = Function.WebTools.GetElement_Id(hdoc, "J-checkcode-img"); codeurl = imgcode.GetAttribute("src"); piccode.Imagelocatio{过滤}n = codeurl; }

【C#|C# webbrowser判断页面是否加载完毕】

    推荐阅读