After working for a long time, there was less click Submit button
type="button"It turned out to be
<form > <button /> </form> As a result, it will refresh the page, plus it
There is an automatic refresh problem of Ajax after submitting button in PS: form form form
//I was just learning from the front desk. I didn't know very well. I dug a hole for myself in the project. Ha ha <form> <div> < label > name of modified data: < label > <div> <input type="text" placeholder="test22"></div> <div> < button onclick = "resetcertificatename (14)" > Modify < / button > </div> </div> </form>
When there is a button tag in the form, after the form is submitted asynchronously with Ajax, the face will also be refreshed. (feels weird)
Reason: the form will be submitted again when the button exists, so the page is refreshed. (previously thought
button type='submit' Button has the ability to submit forms.
Solution: replace button tag with a tag
。 < a onclick = "resetcertificatename (14)" > Modify</a>
The above is a quick solution to the problem that the Ajax form page submitted by Xiaobian will still refresh. I hope it will help you. If you have any questions, please leave a message to me and Xiaobian will reply to you in time. Thank you very much for your support of the developepaer website!