更新时间:2023-01-05 23:06:51
您可以使用beforeSend()
和complete()
函数比较当前时间戳并计算差异.
You can use the beforeSend()
and complete()
functions to compare the current timestamps and calculate the difference.
http://api.jquery.com/jQuery.ajax/
在这里您可以看到$.ajax
提供的所有回调挂钩:
http://api.jquery.com/jQuery.ajax/#callback-functions
Here you can see all callback hooks provided by $.ajax
:
http://api.jquery.com/jQuery.ajax/#callback-functions