A quick solution to the problem will still be refreshed when submitting the Form page via Ajax, ajaxform
After half a day, I used to click the submit button and add fewertype="button"
It turns out to be <form > <button id="sub" /> </form>
The page will be refreshed when any result is obtained.
PS: There is a button in the form that will be automatically refreshed after ajax is submitted.
// Remember a pitfall (I am not very familiar with the front-end course, But I dug a pitfall for myself in the project, haha ...) <form class = "form-horizontal"> <div class = "form-group"> <label class = "col-sm-3 control-label"> modify data Name: </label> <div class = "col-sm-7"> <input type = "text" placeholder = "test22" class = "form-control"> </div> <div class = "col-sm-2"> <button class = "btn-primary" onclick = "resetCertificateName (14) "> modify </button> </div> </form>
When a button label exists in the form, the interface is refreshed after the form is submitted asynchronously using ajax. (It feels weird)
Cause: When a button exists, the form is submitted again, so the page is refreshed. (Previously thoughtbutton type='submit'
) Button.
Solution: Replace the button tag with the tag.. <A class = "btn-primary" onclick = "resetCertificateName (14)"> modify </a>
The above is a quick solution to the problem that will still be refreshed on the Ajax Form submission page introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!