$.ajaxSetup(settings)
Ajax请求全局设置,详细请$. ajax选项描述。
返回值:undefined
参数:settings (Map): 用于Ajax请求的键/值对。
示例:

设置默认请求url为"/xmlhttp/",无全局操作权限,用POST方法请求。下面用Ajax请求一些数据!

  1. $.ajaxSetup( {
  2. url: "/xmlhttp/",
  3. global: false,
  4. type: "POST"
  5. } );
  6. $.ajax({ data: myData });

| | | | | **** | | | | **** | | | | **** | | | | **** | | | | **** | |

function(XMLHttpRequest) {this;// the options for this ajax request}
```  |
| **** |  |  |
| **** |  |

function(XMLHttpRequest, textStatus) {this;// the options for this ajax request}

| **** |  |  |
| **** |  |  |
| **** |  |

[](http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/) [](http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/)  |
| **** |  |

function(XMLHttpRequest, textStatus, errorThrown) {// 通常情况下textStatus和errorThown只有其中一个有值this;// the options for this ajax request}

| **** |  |  |
| **** |  |  |
| **** |  |  |
| **** |  |

function(data, textStatus) {// data could be xmlDoc, jsonObj, html, text, etc...this;// the options for this ajax request}


**http://www.80tvb.com/jquery-ajaxsetup/**