|
||||
|
||||
jQuery.ajaxSetup(options)
version 1.1 以降
解説Ajax通信で使用される共通設定を行います。jQuery内部で保持している初期設定値を上書きします。 ここで設定された内容は、全てのAjax通信で使用されます。 但し、jQuery.ajax(settings) 等で実行時に指定したものは、その通信に限り指定した値が使用されます。 引数
初期設定値jquery-1.4.2.js (Uncompressed) line4934-4969から抜粋
ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, /* timeout: 0, data: null, username: null, password: null, traditional: false, */ // Create the request object; Microsoft failed to properly // implement the XMLHttpRequest in IE7 (can't request local files), // so we use the ActiveXObject when it is available // This function can be overriden by calling jQuery.ajaxSetup xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ? function() { return new window.XMLHttpRequest(); } : function() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*" } },
|
|
|||
© 2007-2011 by いけまさ. All rights Reserved. |