• <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 中的单击按钮?

        C# reach click button in webbrowser?(C# 到达 webbrowser 中的单击按钮?)

          <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# namespace alias - what#39;s the point?(C# 命名空间别名 - 有什么意义?)
                  Using Xpath With Default Namespace in C#(在 C# 中使用具有默认命名空间的 Xpath)
                  Generating an EDMX from a DB2 Database(从 DB2 数据库生成 EDMX)
                  IBM .NET Data Provider Connection String issue with Library List(库列表的 IBM .NET 数据提供程序连接字符串问题)
                  .NET DB2 OLEDB pre-requisites(.NET DB2 OLEDB 先决条件)
                  Referring to Code in IBM.Data.DB2 makes that Assembly Unavailable to the rest of my Solution(引用 IBM.Data.DB2 中的代码使该程序集对我的解决方案的其余部分不可用)

                  • <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>

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

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