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);//加載完成后的事件
        }
        /// <summary>
        /// 頁面加載完事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        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;
        }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM