简体   繁体   中英

What event fires when an AJAX request is sent?

我应该使用什么处理程序来捕获刚刚在document.ready发送到服务器的AJAX请求的时刻?

I think you're looking for .ajaxComplete() .

$('#el').ajaxComplete(function() {
    …
});

Edit

Try this:

$(window).ajaxComplete(function() {
    …
});

Note: these only work if the AJAX request was sent with jQuery.

您可能正在寻找.ajaxSend().ajaxStart() Jquery AJAX事件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM