1

ドキュメントによると、「エラー」ajax イベントは XMLHttpRequest オブジェクトに渡されますが、「成功」には渡されません。

http://docs.jquery.com/Ajax/jQuery.ajax

HTTP ステータス コードに正常にアクセスできるようにしたいので、これは残念です。私はエラーで成功しています。

error: function(data){
    alert(data.status)
}

どんなリードも素晴らしいでしょう。

ありがとうございました。

4

1 に答える 1

1

この場合、成功後に発生するcomplete()コールバックを探します。

// A function to be called when the request finishes 
// (after success and error callbacks are executed). 
// The function gets passed two arguments: The 
// XMLHttpRequest object and a string describing the 
// type of success of the request. This is an Ajax Event. 
complete: function (XMLHttpRequest, textStatus) {
  this; // the options for this ajax request
}
于 2009-10-16T12:58:12.850 に答える