From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/formdata/entries/index.html | 77 ++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 files/ja/web/api/formdata/entries/index.html (limited to 'files/ja/web/api/formdata/entries') diff --git a/files/ja/web/api/formdata/entries/index.html b/files/ja/web/api/formdata/entries/index.html new file mode 100644 index 0000000000..9e9369f4a1 --- /dev/null +++ b/files/ja/web/api/formdata/entries/index.html @@ -0,0 +1,77 @@ +--- +title: FormData.entries() +slug: Web/API/FormData/entries +tags: + - API + - FormData + - Iterator + - Method + - Reference + - XMLHttpRequest API +translation_of: Web/API/FormData/entries +--- +

{{APIRef("XMLHttpRequest")}}

+ +

FormData.entries() メソッドは、 {{jsxref("Iteration_protocols",'iterator')}} を返し、このオブジェクトに含まれる全ての キー/バリュー ペアを通過できるようにします。 各ペアのキーは {{domxref("USVString")}} オブジェクトで、 {{domxref("USVString")}} 、または {{domxref("Blob")}} のいずれかの値。

+ +
+

Note: このメソッドは Web Workers で使用できます。

+
+ +

構文

+ +
formData.entries();
+ +

返り値

+ +

{{jsxref("Iteration_protocols","iterator")}} を返します。

+ +

+ +
// テストの FormData オブジェクトを作成
+var formData = new FormData();
+formData.append('key1', 'value1');
+formData.append('key2', 'value2');
+
+// キー/バリュー ペアの表示
+for(var pair of formData.entries()) {
+   console.log(pair[0]+ ', '+ pair[1]);
+}
+
+ +

結果は次のとおりです:

+ +
key1, value1
+key2, value2
+ +

仕様

+ + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName('XMLHttpRequest','#dom-formdata','entries() (as iterator<>)')}}{{Spec2('XMLHttpRequest')}}初回定義
+ +

ブラウザー実装状況

+ + + +

{{Compat("api.FormData.entries")}}

+ +

関連項目

+ + -- cgit v1.2.3-54-g00ecf