开发者

If an error happens will ajax stop still run?

I am wondering if you do an AJAX request and you have a method that should run when the AJAX request stops. Will the jQuery ajax stop run if the request runs into an error (such as a 500 error) 开发者_运维百科or if say the request times out?


Yes, the ajaxStop() event will execute when this happens :)

It happens in the global complete handler, which executes error or not.

You can test it out a bit here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜