jQuery ajaxSend()メソッド
例
AJAXリクエストが送信されようとしているときに、<div>要素の内容を変更します。
$(document).ajaxSend(function(e, xhr, opt){
$("div").append("<p>Requesting: " + opt.url + "</p>");
});
定義と使用法
ajaxSend()メソッドは、AJAXリクエストが送信されようとしているときに実行する関数を指定します。
注: jQueryバージョン1.8以降、このメソッドはドキュメントにのみ添付する必要があります。
構文
$(document).ajaxSend(function(event,xhr,options))
Parameter | Description |
---|---|
function(event,xhr,options) |
Required. Specifies the function to run if the request succeeds Additional parameters:
|