我浏览到一个网站,一个没有提交按钮,但确实有形式的形式。我想提交这种形式。如何使用C#和WebBrowser控件做到这一点?
I navigated to a website with a form that has no submit button but does have form. I would like to submit this form. How to do this using C# and WebBrowser control?
试试这个(或类似的东西):
Try this (or something like it):
HtmlElementCollection elements = this.webBrowserControl.Document.GetElementsByTagName("Form");
foreach(HtmlElement currentElement in elements)
{
currentElement.InvokeMember("submit");
}