我试图问这个问题之前,但我没有提供足够的信息。我在网站上有一个表格,我无法控制,因此我无法更改网页。从我的vb.net应用程序中,我需要能够在填写所需文本后单击提交按钮。网络浏览器从vb.net提交不工作
文本填充ok,但提交只刷新屏幕。我想知道是否必须调用Java或其他东西?
的VBNet部分,这看起来这样的:
Browser1.Document.Forms("Search").submit
我也试过这样:
Browser1.Document.GetElementById("Search").InvokeMember ("submit")
该网页的HTML是这样的:
<form style="display: inline;" name="Search" method="post"
onsubmit="clearDefault(this.freetext); this.action=addCategory(escape(this.freetext.value) + this.category_id.value + '.html'); return true;">
<table class="innerTable" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
<td><input style="width: 131px;" value=" enter name" name="freetext" size="9" onfocus="clearDefault(this);" type="text"></td>
<td><input class="search" src="/images/search.gif" value="Search" title="Search" type="image"></td>
</tr></tbody></table>
</form>