The callback hooks provided by $. Ajax () are as follows:
beforeSend callback option is invoked; it receives the jqXHR object. And the settings object as parameters.
error callback option, is invoked if the request fails. It receives, the jqXHR a. String indicating the error type and an, exception object if applicable. Some built-in errors will provide a string as the. Exception object: "abort","Timeout", "No Transport."
dataFilter callback option is invoked immediately upon successful receipt of response, data. It receives the returned data and the value of dataType and must, return the (possibly altered) data to pass on to success.
success. Callback option is invoked if the, request succeeds. It receives the returned data a string, containing the, success code. And the jqXHR object.
.Promise callbacks -. Done (), (), fail. Always (), and. Then () - are invoked in the, order they are registered.
complete. Callback, option fires when the request finishes whether in, failure or success. It receives the jqXHR object as well, as. A string containing the success or error code.
การแปล กรุณารอสักครู่..
