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; }
时间: 2024-12-27 09:54:38