This article brings you the content is about the form of jquery in the form of the use of a simple introduction (with code), there is a certain reference value, the need for friends can refer to, I hope to help you.
Jquery-form.js is a good tool for form submission forms, and the most important thing is that after the Proxy form form submits the data, there is a callback method that can get the data returned by the server and determine if the form form submission failed and succeeded.
/** * Callback processing after submitting data for form form (the best file upload in form form) */function jqueryfromtemplate () { //ajax form commits let options = { Type: ' POST ', URL: ' Request address ', dataType: ' json ', success:function (response) { alert (response) }, error:function (XHR, status, err) { alert ("Registration failed", err); } }; The form form submits $ ("#from"). Ajaxsubmit (options);}