jQuery ajaxSuccess () method
Examples
When the AJAX request is successfully completed, triggering a prompt box:
$(document).ajaxSuccess(function(){
alert("AJAX 请求完成");
});
alert("AJAX 请求完成");
});
try it"
Definition and Usage
ajaxSuccess () method specifies a function to run when an AJAX request completes successfully.
Note: Since jQuery version 1.8 onwards, this method is only attached to the document.
grammar
$(document).ajaxSuccess(function(event,xhr,options))
参数 | 描述 |
---|---|
function(event,xhr,options) |
必需。规定如果请求成功时运行的函数。 额外的参数:
|
More examples
Use the options parameter
How to use the options parameter to limit the function uses AJAX request specific documents.