Statement: The material used in this column is written by the VIP students of the Kay Academy, who has the right to be anonymous and has the final right to interpret the article; The Edith Academy is designed to promote students to learn from each other on the basis of public notes.
The Ajax package of jquery works as follows:
$get $post operation is the same as the name is not the same!
The URL is the address of your visit
Data is your form.
The function callback function is to wait for your request to complete the returned data to the functions!
Datatypoe data type If you do not have a write return type on your server then you will have to write this parameter! The JSON type is returned and you write the JSON text XML
A means that the server feeds back the data if the server returns JSON then this a is a JSON object if it is a string then this is a string type B indicates the success of this Access server success indicates success! He has a third parameter, JQXHR, is the XMLHttpRequest object.
Parameter collection This could be a bit of a hassle. If you have 100 data on your form, then you have to write 100. There is a special collection of form data called serialization you can copy this to your local JS file:
Https://cdn.bootcss.com/jquery.serializeJSON/2.8.1/jquery.serializejson.min.js
After downloading this file, bring her to the lock on your page and remember that the introduction must be written in jquery under the meaning of Jqurey before introducing him!
After introduction, remember that the name of your form must be written!!!!! Then submit the current object parameters to the method to get the current object can be submitted
Return to JSON examples such as:
Request operation of Ajax
The use of Ajax in jquery