How to implement a form submission without refreshing the current page
<form name= ' Form1 ' id= ' Form1 ' action= ' '/xbcw/cw/xx_xx.action ' method= ' post ' > <input type= '
button ' id= ' Btnsubmit "Name=" btnsubmit "value=" Save "onclick=" ADDKP () "class=" "Button2"/> <input type=
"button" id= " Btnsubmit "Name=" btnsubmit "value=" Next "onclick=" Doaddcwkpsubmit () "class=" Button2 "/>
</form>
When I click the Save Submit Form form, how do I keep the current page unchanged (that is, not refresh the current page)?
Add an iframe after the form form
<iframe id="rfFrame" name="rfFrame" src="about:blank" style="display:none;"></iframe>
Point Save Commit event you need to change target to an IFRAME name:
JS:document.forms[0].target="rfFrame";
JQuery:$("#f2").attr("target","rfFrame");
This means that the form is submitted to save the data, and the page will not jump.
The above is the entire content of this article, I hope to help you, but also hope that a lot of support cloud Habitat community!