表格B上的提交按钮尝试提交表格A.

时间:2013-11-09 09:13:50

标签: html5 forms form-submit

我有一个包含两个表单的超级鱼菜单,超级鱼标签1中的搜索框和标签3中的简报注册。搜索表单工作正常,只要搜索表单不存在,简报注册就可以正常工作这页纸。但是当两者都存在时,简报注册表单上的提交按钮似乎会尝试提交搜索,这不仅不会签署用户的简报,而且也不会搜索任何内容。

我的代码是这样的:

<form class="search-form" action="/search/node" method="post" id="search-form" accept-charset="UTF-8"><div><div class="container-inline form-wrapper" id="edit-basic"><div class="form-item form-type-textfield form-item-keys">
 <input type="text" id="edit-keys" name="keys" value="" size="20" placeholder="  Search this site" maxlength="255" class="form-text" />
</div>
<input type="submit" id="edit-submit" name="op" value="Go" class="form-submit" /></div><input type="hidden" name="form_build_id" value="form--JTbYKjZwG8SjIstLVU7J0HOiZZiSoB88bE4VoRYTG4" />
<input type="hidden" name="form_token" value="HoVlLGidOtcgITb3XmNhvH7mKKzW8ldmnahr3t0HGAU" />
<input type="hidden" name="form_id" value="search_form" />

<many other divs>

<form class="webform-client-form" enctype="multipart/form-data" action="/content/newsletter-signup" method="post" id="webform-client-form-22" accept-charset="UTF-8"><div>
<div class="form-item webform-component webform-component-email webform-container-inline" id="webform-component-email">
 <input class="email form-text form-email required" type="email" id="edit-submitted-email" placeholder="Email address" name="submitted[email]" size="24" />
</div>
<div class="form-item webform-component webform-component-textfield webform-container-inline" id="webform-component-name">
 <input type="text" id="edit-submitted-name" name="submitted[name]" value="" placeholder="Name" size="14" maxlength="128" class="form-text required" /> <input type="submit" id="edit-submit" name="op" value="Submit" class="form-submit" />
</div>
<input type="hidden" name="details[sid]" value="" />
<input type="hidden" name="details[page_num]" value="1" />
<input type="hidden" name="details[page_count]" value="1" />
<input type="hidden" name="details[finished]" value="0" />
<input type="hidden" name="form_build_id" value="form-I8MgMoURjB6BhqJATKhhNZ5nAUwk855bGWgxH75Gs5Q" />
<input type="hidden" name="form_token" value="IKALClB6fmkRPFA6Ko8VIbBN2uDEwpVBxFM6w2_2JAo" />
<input type="hidden" name="form_id" value="webform_client_form_22" />
</div></form>

如何在第二个(简报注册)表单上提交提交按钮以提交该表单而不是搜索?

0 个答案:

没有答案