How to return the error message to ajax without refreshing the page, but instead prompt the error that needs to be corrected
星空下的世界2019-03-06 00:55:16
Change the <button>submit label to<input type="botton"> and the page will not be refreshed.
In addition to the text prompt returned by the verification error, is there anything else? The data is returned. For example, if the name is wrong, return my name so that I can judge again, and then add
to the class on the input tag.