From e21ecd18fedfed8a3bec10530dbcf51f5d4f2ab5 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sat, 29 Jan 2022 13:58:25 +0900 Subject: 2021/09/15 時点の英語版に同期 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/api/xmlhttprequest/status/index.md | 56 +++++++++---------------- 1 file changed, 20 insertions(+), 36 deletions(-) (limited to 'files/ja/web') diff --git a/files/ja/web/api/xmlhttprequest/status/index.md b/files/ja/web/api/xmlhttprequest/status/index.md index 6b42a3ceb2..709df960e5 100644 --- a/files/ja/web/api/xmlhttprequest/status/index.md +++ b/files/ja/web/api/xmlhttprequest/status/index.md @@ -3,25 +3,26 @@ title: XMLHttpRequest.status slug: Web/API/XMLHttpRequest/status tags: - API - - XMLHttpRequest - - XMLHttpRequest の結果 - - status - エラー - プロパティ - リファレンス + - XMLHttpRequest + - XMLHttpRequest ステータス + - 結果 + - status +browser-compat: api.XMLHttpRequest.status translation_of: Web/API/XMLHttpRequest/status --- -
{{APIRef('XMLHttpRequest')}}
- -

XMLHttpRequest.status プロパティは読み取り専用で、 XMLHttpRequest のレスポンスにおける数値の HTTP ステータスコードを返します。

- +{{APIRef('XMLHttpRequest')}} +**`XMLHttpRequest.status`** プロパティは読み取り専用で、 `XMLHttpRequest` のレスポンスにおける数値の HTTP [ステータスコード](/ja/docs/Web/HTTP/Status)を返します。 -

リクエストが完了する前は、 status の値は 0 になります。 XMLHttpRequest がエラーになった場合も、ブラウザーはステータスとして 0 を返します。

+リクエストが完了する前は、 `status` の値は 0 になります。 `XMLHttpRequest` がエラーになった場合も、ブラウザーはステータスとして 0 を返します。 -

+## 例 -
var xhr = new XMLHttpRequest();
+```js
+var xhr = new XMLHttpRequest();
 console.log('UNSENT: ', xhr.status);
 
 xhr.open('GET', '/server');
@@ -38,41 +39,24 @@ xhr.onload = function () {
 xhr.send();
 
 /**
- * Outputs the following:
+ * 出力結果は以下の通り。
  *
  * UNSENT: 0
  * OPENED: 0
  * LOADING: 200
  * DONE: 200
  */
-
+``` -

仕様書

+## 仕様書 - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('XMLHttpRequest', '#the-status-attribute')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+{{Specifications}} -

ブラウザーの互換性

+## ブラウザーの互換性 -

{{Compat("api.XMLHttpRequest.status")}}

+{{Compat}} -

関連情報

+## 関連情報 - +- [HTTP レスポンスコード](/ja/docs/Web/HTTP/Response_codes)の一覧 +- [HTTP](/ja/docs/Web/HTTP) -- cgit v1.2.3-54-g00ecf