Is there any callback which i can use after AJAX request send but before success return? lets say my success is taking longer because i am running something in loop but on every iteration i am updating a table for lets say percentage completion. I wanted to poll that table in between and that's the reason i am looking for that callback. any help?

由于$.ajax(or $.getor $.post) 不会阻止脚本的执行,您可以在 ajax 调用之后立即编写轮询代码: $.ajax( ... your ajax call ...); // your polling code 或者您可以使用该beforeSend事件,该事件将在发送请求之前立即执行: $.ajax({ beforeSend : function() { // your polling code } });

How to show loading status in percentage for ajax response?的可能重复项?