search

Home  >  Q&A  >  body text

Error message does not refresh the page

How to return the error message to ajax without refreshing the page, but instead prompt the error that needs to be corrected

星空下的世界星空下的世界2119 days ago941

reply all(2)I'll reply

  • 星空下的世界

    星空下的世界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.

    reply
    0
  • Cancelreply