HTML表单onsubmit = null但是将我发送到页面

时间:2013-11-05 02:06:21

标签: html forms input onsubmit

所以当我提交此表单时,我正在试图找出将我发送到另一个页面的内容。 frmS.onsubmit = null。此外,提交按钮没有点击,可以将您发送到另一个页面。我想了解它如何将我发送到另一页以及如何阻止它。 编辑:我应该补充一点,我希望它发送它的发送信息,但不要把我扔到下一页。

EDIT2:已解决我已制作iframe并将表单目标设置为该iframe。谢谢Paul Draper

<form name="frmS" method="post" action="/s.aspx?sm=1jFsQEImT6d7s5gJzLre0g%3d%3d" id="frmS">
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWDwL+raDpAgLOhOEnAqrszZoKAsv4g6IHAqDo8XkCqc7S2wcC96SjuQgC+beo3gUCi5yS5QgCsOmqpAECjce8xA0C0I38vQkCnNGksA4Cw/alsQoC1J6ZlwQMnZiKw/euXyNaAEgF3qFMFg5vlA==">
<input type="hidden" name="__VIEWSTATE" id="
__VIEWSTATE" value="">

</div>

<!--content area-->

<div id="PageContentDiv"><div style="text-align:left;"><div class="sLogo"><img class="notranslate" src="http://secure.surveymonkey.com/_resources/4485/45604485/552bd2d8-f3b6-4e1f-b1e5-3c5ea48189b9.gif" alt=""><div class="sExit"><a class="ExitBtn" target="_self" href="http://www.gazette.net/teacher">Exit this survey</a>&nbsp;</div><br class="clear"></div></div><h1 class="sTitle"><div style="text-align:left;float:none;"><span class="notranslate">My Favorite Teacher 2013 - Montgomery County High School</span></div></h1><div class="pTitle"><h2>2. </h2>&nbsp;<br class="clear"></div><div class="pgHdr"><div id="q1" class="question" style="margin:0 0 0 0;width:auto"><div class="qContent"><div class="qHeader"><abbr class="noborder" title="Question 1">1</abbr>. Please provide your name and e-mail address below. Click done below to submit your vote.</div><div class="qBody"><table cellspacing="0" cellpadding="3" border="0" style="width:100%;"><tbody><tr><td style="width:20%;font-weight:bold;"><label for="text_579095901_6719868704"><span class="hlbl">Please provide your name and e-mail address below. Click done below to submit your vote. &nbsp; </span>Name: (Optional)</label></td><td valign="top"><input id="text_579095901_6719868704" name="text_579095901_6719868704" type="text" size="30" value="" class="open"></td></tr><tr><td style="width:20%;font-weight:bold;"><label for="text_579095901_6719868706">Email Address: (Optional)</label></td><td valign="top"><input id="text_579095901_6719868706" name="text_579095901_6719868706" type="text" size="30" value="" class="open"></td></tr></tbody></table></div></div></div></div></div>
<!--end content area-->
<div id="panButtonBar">

<div style="text-align:center;">
<input type="submit" name="PrevButton" value="Prev" onclick="onesubmit(this);" id="PrevButton" class="btn btntext grey">
<input type="submit" name="NextButton" value="Done" onclick="onesubmit(this);" id="NextButton" class="btn btntext grey">

</div>


</div>







<div class="spacer" style="height:100px;">&nbsp;</div>


<input type="hidden" name="hid_smC0l1d" id="hid_smC0l1d" value="r9nWM11rHijwX3dDZ1G8NQ_3d_3d">
<input type="hidden" name="hid_smRsL1d" id="hid_smRsL1d">
<input type="hidden" name="hid_smRs1d" id="hid_smRs1d" value="mII0H4g5XRCu4s1ZVhHXsg_3d_3d">
<input type="hidden" name="hid_smCSV" id="hid_smCSV">
<input type="hidden" name="hid_smS1d" id="hid_smS1d" value="rbQr6Wx8ieI2e98gDtyjNA_3d_3d">
<input type="hidden" name="hid_smM0D" id="hid_smM0D" value="E6uK1MhOcpBUysyKlC0vrg_3d_3d">
<input type="hidden" name="hid_smV3Rsn" id="hid_smV3Rsn" value="ryjiA1jsXxArHG3rMuiwxg_3d_3d">
<input type="hidden" name="hid_smS3CT1d" id="hid_smS3CT1d" value="IGaEFrQzyw9OHNYpBjkYsg_3d_3d">
<input type="hidden" name="hid_DC" id="hid_DC" value="UTLbMdg3R07bopsDbKUHM51JeIvWdftG8_2bHZNxxsXT_2bITWvXP9m1Zy_2fqRmNPpOx7">
<input type="hidden" name="Hidden_CollectorToken" id="Hidden_CollectorToken">

<input type="hidden" name="Hidden_Simple" id="Hidden_Simple">
<input type="hidden" name="hid_l04dez" id="hid_l04dez" value="RsDrTe_2b1IjsIQj68b5l2TrRCB0SORAXCRx0_2bpMErNSQ_3d">





<div>


</div></form>

2 个答案:

答案 0 :(得分:0)

您正在从服务器获得重定向响应(假设您表单上的action是您当前的页面;如果没有,您将去那里)。

如果您想在不导航的情况下提交表单,请创建iframe,然后将表单的target属性设置为iframe。

答案 1 :(得分:0)

第一行将您转到另一页 -

<form name="frmS" method="post" action="/s.aspx?sm=1jFsQEImT6d7s5gJzLre0g%3d%3d" id="frmS">

您将被发送到表单的action属性中指定的URL。