jQuery Ajax


  • var jqXHR = $.ajax( url [,settings] )
  • var jqXHR = $.ajax( [settings] )
  • jqXHR.done(function( data, textStatus, jqXHR ) {});
  • jqXHR.fail(function( jqXHR, textStatus, errorThrown ) {});
  • jqXHR.always(function( jqXHR ) {});


urlSpecifies the URL to which the request will be sent
settingsan object containing numerous values that affect the behavior of the request
typeThe HTTP method to be used for the request
dataData to be sent by the request
successA callback function to be called if the request succeeds
errorA callback to handle error
statusCodeAn object of numeric HTTP codes and functions to be called when the response has the corresponding code
dataTypeThe type of data that you're expecting back from the server
contentTypeContent type of the data to sent to the server. Default is "application/x-www-form-urlencoded; charset=UTF-8"
contextSpecifies the context to be used inside callbacks, usually this which refers to the current target.


AJAX stands for Asynchronous JavaScript and XML. AJAX allows a webpage to perform an asynchronous HTTP (AJAX) request to the server and receive a response, without needing to reload the entire page.