如果你想提交一份表格,你可以查看
// get the document
mshtml.IHTMLDocument2 doc = ((mshtml.HTMLDocumentClass)webBrowser1.Document);
// set a variable
((mshtml.IHTMLElement)doc.all.item("q")).setAttribute("value", "my input...");
// click a button
((mshtml.HTMLInputElement)doc.all.item("btnI")).click();
Run Code Online (Sandbox Code Playgroud)
命名空间mshtml位于Microsoft.mshtmlAssembly中.
只需添加引用Microsoft.mshtml.
希望这可以帮助
| 归档时间: |
|
| 查看次数: |
5648 次 |
| 最近记录: |