Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用定义的函数导航我的网络浏览器,例如:
webbrowser1.navigate (my defined function);
此网络浏览器在用户控件中定义,因此任何人都可以更改其默认网页
如何定义路径设置的函数?
试试下面的代码:
HtmlElementCollection ele = this.webBrowserControl.Document.GetElementsByTagName("Form"); foreach(HtmlElement currentElement in ele) { currentElement.InvokeMember("submit"); }
或者
webbrowser.Document.All["ID OF ELEMENT"].InvokeMember("click");
希望它有帮助。