1. Introduction
The JQuery form plugin is a powerful Ajax form submission plugin that allows us to easily and easily implement our forms
Convert from traditional submission to Ajax no refresh submission!
He offers two core approaches to Ajaxform and ajaxsubmit
Let us easily implement a no-refresh effect Submission Form!
http://malsup.com/jquery/form/
Https://github.com/malsup this because it is the author of the Gitbub, I downloaded a look at the Readme file is
Api
2. Quick Start
1. Introduction of Plugins
(Method with jquery)
2. Convert form to Ajax submission by traditional submission method
jquery Form object. Ajaxform ();
Import the server and then open the page to see if there are any errors (such as JS or CSS import success)
(Because of the use of the server I was to transfer this directly to a Java project I am doing, the video is placed in the server, the background is PHP, of course, your background can be Python, etc.)
Ajaxform () method
Add the required event handlers for your form and prepare for the AJAX submission form.
The Ajaxform () method does not submit the form directly, but instead prepares the form for the AJAX submission
The actual form submission also requires the user to click the Submit button (that is, to wait until the form submits the event)
Parameters: Function (will execute after successful commit) or configure an object
Common configuration properties in configuration objects:
1) URL
Submit form data to a developed URL
2) Type
Specify how form data is submitted
3) BeforeSerialize
Pass in a function that executes before the form data is serialized, which can provide an opportunity for us to modify the form data
The function accepts two parameters, the current form of a jquery object, and the configuration object that is passed into the Ajaxform method
return false within function the form will not be submitted
4) Beforesumit
callback function before form submission
The function accepts three parameters, an array form of form data, a jquery form object, and a configuration object passed into the Ajaxform method
return false within the function to not submit the form.
5) Success
JQuery Plugin-form submission plugin-jquery.form