jquery encapsulates some ajax request methods, which are very practical.
For example, .ajaxComplete() - when the request is completed. ajaxError() - when the request fails. ajaxSend() - attach a function to execute when the Ajax request is sent. ajaxStart() - when the request starts, .ajaxStop ()——When the request ends.ajaxSuccess()——When the request is successful.load()——Load data from the server and replace the returned HTML into the selected element jQuery.post()——Load using HTTP POST request Server-side data.serialize() - Encode the set of form elements into a string for submission. serializeArray() - Encode the set of form elements into an array of key-value pairs jQuery.param() - Create a serialized array or object, making it applicable to a URL query string or Ajax request jQuery.getScript() - loads a js file from the server and then executes it jQuery.getJSON() - loads JSON-encoded data from the server jQuery .get()——Loading data from the server is a simple matter of two points: 1. .ajaxStart() and .ajaxStop()