The Ajax global event reference method in jQuery and the execution sequence of each event (Global/local), jqueryajax
The event execution sequence in jquery is as follows:
1. ajaxStart (Global Event)
2. beforeSend (local event)
3. ajaxSend (Global Event)
4. success (local event)
5. ajaxSuccess (Global Event)
6. error (local event)
7. ajaxError (Global Event)
8. complete (partial event)
9. ajaxComplete (Global Event)
10. ajaxStop (Global Event)
Global events can be referenced outside ajax-related methods (for example, the information of each stage of ajax execution is displayed somewhere on the page ).
The following example shows the sequence of event execution in an ajax request and how to use global ajax.
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd">
The above section describes the Ajax global event reference method and the execution sequence of each event (Global/local) in jQuery. I hope this will help you!