• <tfoot id='1iKC4'></tfoot>
  • <i id='1iKC4'><tr id='1iKC4'><dt id='1iKC4'><q id='1iKC4'><span id='1iKC4'><b id='1iKC4'><form id='1iKC4'><ins id='1iKC4'></ins><ul id='1iKC4'></ul><sub id='1iKC4'></sub></form><legend id='1iKC4'></legend><bdo id='1iKC4'><pre id='1iKC4'><center id='1iKC4'></center></pre></bdo></b><th id='1iKC4'></th></span></q></dt></tr></i><div id='1iKC4'><tfoot id='1iKC4'></tfoot><dl id='1iKC4'><fieldset id='1iKC4'></fieldset></dl></div>

      <small id='1iKC4'></small><noframes id='1iKC4'>

      • <bdo id='1iKC4'></bdo><ul id='1iKC4'></ul>

      1. <legend id='1iKC4'><style id='1iKC4'><dir id='1iKC4'><q id='1iKC4'></q></dir></style></legend>

        C# 到达 webbrowser 中的单击按钮?

        时间:2023-09-16

          <tfoot id='GslEg'></tfoot>

        1. <small id='GslEg'></small><noframes id='GslEg'>

          • <bdo id='GslEg'></bdo><ul id='GslEg'></ul>

            <legend id='GslEg'><style id='GslEg'><dir id='GslEg'><q id='GslEg'></q></dir></style></legend>

                    <tbody id='GslEg'></tbody>
                  <i id='GslEg'><tr id='GslEg'><dt id='GslEg'><q id='GslEg'><span id='GslEg'><b id='GslEg'><form id='GslEg'><ins id='GslEg'></ins><ul id='GslEg'></ul><sub id='GslEg'></sub></form><legend id='GslEg'></legend><bdo id='GslEg'><pre id='GslEg'><center id='GslEg'></center></pre></bdo></b><th id='GslEg'></th></span></q></dt></tr></i><div id='GslEg'><tfoot id='GslEg'></tfoot><dl id='GslEg'><fieldset id='GslEg'></fieldset></dl></div>

                • 本文介绍了C# 到达 webbrowser 中的单击按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想点击 webbrowser 对象中的事件按钮.

                  I want to click event button in webbrowser object.

                  按钮被点击我想伸出手来写代码?比如登录按钮被点击网站上弹出的webbrowser对象捕获事件,想写代码?

                  Button is clicked I want to reach out and write the code? For example, the login button is clicked on the webbrowser object in the pop-up on the site to capture the event and would like to write the code?

                  推荐答案

                  我给你写个例子(如何获取事件点击按钮):

                  I write an example for you(how get event clicked button):

                  private void Form1_Load(object sender, EventArgs e)
                  {
                  //Or navigate to your url                
                  webBrowser1.DocumentText = "<html><body><button id="btn1" type="button">Click Me!</button><button id="btn2" type="button">Click Me!</button></body></html>";
                  }
                  

                  调用点击事件:(页面加载时)

                   private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
                      {
                  
                       webBrowser1.Document.Click += new HtmlElementEventHandler(Document_Click);
                      }
                  

                  当用户点击文档时获取活动元素

                   void Document_Click(object sender, HtmlElementEventArgs e)
                          {
                             //Check Element is Button 
                             if (webBrowser1.Document.ActiveElement.TagName == "BUTTON")
                             {
                               if (webBrowser1.Document.ActiveElement.Id== "your button id")
                               {
                                 //Do someting
                               }
                             }
                          }
                  

                  这篇关于C# 到达 webbrowser 中的单击按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:c# 使用事件处理程序WorkbookOpen 下一篇:在动态事件处理程序中引用“this"

                  相关文章

                • <legend id='8tdcB'><style id='8tdcB'><dir id='8tdcB'><q id='8tdcB'></q></dir></style></legend>
                  <i id='8tdcB'><tr id='8tdcB'><dt id='8tdcB'><q id='8tdcB'><span id='8tdcB'><b id='8tdcB'><form id='8tdcB'><ins id='8tdcB'></ins><ul id='8tdcB'></ul><sub id='8tdcB'></sub></form><legend id='8tdcB'></legend><bdo id='8tdcB'><pre id='8tdcB'><center id='8tdcB'></center></pre></bdo></b><th id='8tdcB'></th></span></q></dt></tr></i><div id='8tdcB'><tfoot id='8tdcB'></tfoot><dl id='8tdcB'><fieldset id='8tdcB'></fieldset></dl></div>
                • <tfoot id='8tdcB'></tfoot>

                        <bdo id='8tdcB'></bdo><ul id='8tdcB'></ul>

                      <small id='8tdcB'></small><noframes id='8tdcB'>