VB 自动提交的问题 高分急等
<th><span>*</span>标题:</th><tdcolspan="2"> <inputtype="text"id="form1_title...
<th><span>*</span> 标题:</th>
<td colspan="2"> <input type="text" id="form1_title" size="30" onBlur="checkForm.title(this);" name="title" value="举证" maxlength="100"> <span id="form1_title_err" class="err"></span></td>
</tr>
<tr>
<th valign="top" style="padding-top:12px;"><span>*</span> 举证链接:</th>
<td colspan="2" id="form1_links">
1.<input type="text" id="form1_link1" onBlur="checkForm.links(this);" value="" size="40" maxlength="1024"> <span id="form1_links_err" class="err"></span><span id="form1_link1_err" class="err"></span><br>
2.<input id="form1_link2" onBlur="checkForm.links(this);" type="text" size="40" maxlength="1024"> <span id="form1_link2_err" class="err"></span><br>
3.<input id="form1_link3" onBlur="checkForm.links(this);" type="text" size="40" maxlength="1024"> <span id="form1_link3_err" class="err"></span><br>
</td>
</tr>
<tr>
<th></th>
<td colspan="2"> <input type="button" value="增加..." id="form1_add_link" onClick="tousu.addLink(1)"> 点击增加</td>
</tr>
<tr>
<th>申诉ID:</th>
<td colspan="2"> <input name="ids" id="form1_ids" onBlur="checkForm.checkID(this, false);" type="text" maxlength="14"> <span id="form1_ids_err" class="err"></span></td>
</tr>
<tr>
<th>描述:</th>
<td width="450">
<textarea name="content" id="form1_content" onblur="checkForm.content(this,false);" cols="55" rows="10" class="ipt_area"></textarea>
</td>
<td>
<span id="form1_content_info">请您详细描述(500个汉字以内)</span><br>
<span id="form1_content_err" class="err"></span>
</td>
</tr>
<tr id="form1_username_tr" style="display:none">
<th>用户名:</th>
<td colspan="2"> <span id="form1_username_holder"></span></td>
</tr>
<tr>
<th></th>
<td colspan="2"> <input type="submit" class="btn" value="提交"></td>
</tr>
</table>
<input type="hidden" name="links" id="form1_link">
<input type="hidden" name="category" value="1">
</form>
上面文章 提交的部分 没有name 请问高手怎么 按下那个按钮
<form method="post" name="tousu_form1" id="tousu_form1" onsubmit="return checkForm.checkSubmit(this)" action="/hi/submit" target="ifr">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
form有一个 onsubmit
用form submit 网页提示参数错误 展开
<td colspan="2"> <input type="text" id="form1_title" size="30" onBlur="checkForm.title(this);" name="title" value="举证" maxlength="100"> <span id="form1_title_err" class="err"></span></td>
</tr>
<tr>
<th valign="top" style="padding-top:12px;"><span>*</span> 举证链接:</th>
<td colspan="2" id="form1_links">
1.<input type="text" id="form1_link1" onBlur="checkForm.links(this);" value="" size="40" maxlength="1024"> <span id="form1_links_err" class="err"></span><span id="form1_link1_err" class="err"></span><br>
2.<input id="form1_link2" onBlur="checkForm.links(this);" type="text" size="40" maxlength="1024"> <span id="form1_link2_err" class="err"></span><br>
3.<input id="form1_link3" onBlur="checkForm.links(this);" type="text" size="40" maxlength="1024"> <span id="form1_link3_err" class="err"></span><br>
</td>
</tr>
<tr>
<th></th>
<td colspan="2"> <input type="button" value="增加..." id="form1_add_link" onClick="tousu.addLink(1)"> 点击增加</td>
</tr>
<tr>
<th>申诉ID:</th>
<td colspan="2"> <input name="ids" id="form1_ids" onBlur="checkForm.checkID(this, false);" type="text" maxlength="14"> <span id="form1_ids_err" class="err"></span></td>
</tr>
<tr>
<th>描述:</th>
<td width="450">
<textarea name="content" id="form1_content" onblur="checkForm.content(this,false);" cols="55" rows="10" class="ipt_area"></textarea>
</td>
<td>
<span id="form1_content_info">请您详细描述(500个汉字以内)</span><br>
<span id="form1_content_err" class="err"></span>
</td>
</tr>
<tr id="form1_username_tr" style="display:none">
<th>用户名:</th>
<td colspan="2"> <span id="form1_username_holder"></span></td>
</tr>
<tr>
<th></th>
<td colspan="2"> <input type="submit" class="btn" value="提交"></td>
</tr>
</table>
<input type="hidden" name="links" id="form1_link">
<input type="hidden" name="category" value="1">
</form>
上面文章 提交的部分 没有name 请问高手怎么 按下那个按钮
<form method="post" name="tousu_form1" id="tousu_form1" onsubmit="return checkForm.checkSubmit(this)" action="/hi/submit" target="ifr">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
form有一个 onsubmit
用form submit 网页提示参数错误 展开
3个回答
展开全部
没有关系,你这个在表单Form里的话,按下按钮就会自动提交的。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Dim vDoc As MSHTML.HTMLDDElement
Set vDoc = WebBrowser1.Document
Set vDoc = vDoc.childNodes(2)
Dim vbody As MSHTML.HTMLBody
Set vbody = vDoc.childNodes(1)
Dim vDiv As MSHTML.HTMLDivElement
Set vDiv = vbody.childNodes(1)
Dim vDiv2 As MSHTML.HTMLDivElement
Set vDiv2 = vDiv.childNodes(5)
Dim vDiv3 As MSHTML.HTMLDivElement
Set vDiv3 = vDiv2.childNodes(1)
Dim vDiv4 As MSHTML.HTMLDivElement
Set vDiv4 = vDiv3.childNodes(1)
Dim vForm As MSHTML.HTMLFormElement
Set vForm = vDiv4.childNodes(0).childNodes(1) '投诉页面一共有4个表单,各个表单结构不同,这里以第一个为例
'如果是第二个表单,则是Set vForm = vDiv4.childNodes(1).childNodes(1)
'修改第一个childnodes的数字即可
Dim vButton As MSHTML.HTMLButtonElement
'第一个表单里的按钮索引是6,这个需要一个一个自己去数,每个表单都不一样
Set vButton = vForm.getElementsByTagName("input")(6)
vButton.Click
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate "http://tousu.baidu.com/zhidao/add"
End Sub
Dim vDoc As MSHTML.HTMLDDElement
Set vDoc = WebBrowser1.Document
Set vDoc = vDoc.childNodes(2)
Dim vbody As MSHTML.HTMLBody
Set vbody = vDoc.childNodes(1)
Dim vDiv As MSHTML.HTMLDivElement
Set vDiv = vbody.childNodes(1)
Dim vDiv2 As MSHTML.HTMLDivElement
Set vDiv2 = vDiv.childNodes(5)
Dim vDiv3 As MSHTML.HTMLDivElement
Set vDiv3 = vDiv2.childNodes(1)
Dim vDiv4 As MSHTML.HTMLDivElement
Set vDiv4 = vDiv3.childNodes(1)
Dim vForm As MSHTML.HTMLFormElement
Set vForm = vDiv4.childNodes(0).childNodes(1) '投诉页面一共有4个表单,各个表单结构不同,这里以第一个为例
'如果是第二个表单,则是Set vForm = vDiv4.childNodes(1).childNodes(1)
'修改第一个childnodes的数字即可
Dim vButton As MSHTML.HTMLButtonElement
'第一个表单里的按钮索引是6,这个需要一个一个自己去数,每个表单都不一样
Set vButton = vForm.getElementsByTagName("input")(6)
vButton.Click
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate "http://tousu.baidu.com/zhidao/add"
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用document.formName.submit();//formName就是那个<form name="">的name值
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询