Everyone, can anyone tell me how to monitor failure in jqu开发者_运维问答ery ajax call. We have 'success:' for success but is there is anyway to detect failure event.
Thanks
There is error callback for that:
$.ajax({
........,
........,
success: function(){alert('success !');},
error:function(){alert('failed!');},
});
See the DOCS for more information :)
There is also the 'error' callback.
加载中,请稍侯......
精彩评论