How to prevent the current page from being refreshed after submitting the form
<form name='form1' id='form1' action='/xbcw/cw/xx_xx.action' method='post'> <input type="button" id="btnSubmit" name="btnSubmit" value="保存" onclick="addKp()" class="Button2" /> <input type="button" id="btnSubmit" name="btnSubmit" value="下一步" onclick="doAddCwKpSubmit()" class="Button2" /> </form>
When I click Save to submit the FORM form, how can I keep the current page unchanged (that is, not refresh the current page)?
Add an iframe after the FORM form
Click Save In the submission event, you need to change the target to the name of the iframe: JS: document.forms[0].target="rfFrame"; );
In this way, the FORM is submitted and the data is saved, and the page will not jump.