jQuery Tutorial Tutorials - jQuery.ajaxSetup()

jQuery jQuery.ajaxSetup()

The jQuery.ajaxSetup() method in jQuery is used to set up default values for the future Ajax requests.

jQuery jQuery.ajaxSetup() syntax

jQuery.ajaxSetup(options)

options is a set of key/value pairs that configure the default Ajax request.

jQuery jQuery.ajaxSetup() example

example

Sets the defaults for Ajax requests

$.ajaxSetup({
  url: "/xmlhttp/",
  global: false,
  type: "POST"
});
$.ajax({ data: myData });

Date:2019-08-30 02:54:26 From:www.Lautturi.com author:Lautturi