$.ajaxSetup()-为将来的Ajax请求设置默认值。例如,您可以在此处设置要 始终 用于每个请求的ajax URL 。
例:
$.ajaxSetup({ // Always use this URL for every request url: "http://example.com/ajax.php"});$.ajaxPrefilter()-在发送每个请求之前修改现有选项。例如,您可以将查询字符串组件附加到每个发出的ajax请求中。
例:
$.ajaxPrefilter( function(options) { // Always add "?debug=1" to every URL options.url += (options.url.indexOf("?") < 0 ? : "?" : "&") + "debug=1";});


