Events defined by the XMLHttpRequest object:
abort--triggered when the request is terminated (progressevent);
error--triggered when the request fails (progressevent);
load--triggered upon successful completion of the request (progressevent);
loadend--triggered when the request is complete, regardless of success or error (progressevent);
loadstart--triggered at the start of the request (progressevent);
progress--trigger to indicate the progress of the request (progressevent);
readystatechange--Trigger (Event) at different stages of the request life cycle;
timeout--triggered if the request timed out (progressevent);
Note: Given that browser support for other events is not in place, ReadyStateChange is currently the only event that can reliably track the progress of a request.
Additional properties defined by the Progressevent object:
lengthcomputable--returns True if the length of the data stream can be computed;
loaded--returns the amount of data currently loaded;
total--returns the total amount of data available;
/span>
<! DOCTYPE html>Apples.html page:<! DOCTYPE html>
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
JavaScript uses AJAX events