JQuery error option in $.ajax utility

前端 未结 5 527
感动是毒
感动是毒 2020-12-04 10:18

The documentation indicates that the error: option function will make available: XHR instance, a status message string (in this case always error) and an optional exception

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 10:58

    Looking at the jQuery source code, there are four returned statuses, in additon to success:

    • timeout - when your specified timeout is exceeded
    • error - http error, like 404
    • notmodified - when requested resource was not modified since last request
    • parsererror - when an xml/json response is bad

提交回复
热议问题