aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/formdata/keys/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/formdata/keys/index.html')
-rw-r--r--files/ja/web/api/formdata/keys/index.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/files/ja/web/api/formdata/keys/index.html b/files/ja/web/api/formdata/keys/index.html
new file mode 100644
index 0000000000..0e9fd69673
--- /dev/null
+++ b/files/ja/web/api/formdata/keys/index.html
@@ -0,0 +1,77 @@
+---
+title: FormData.keys()
+slug: Web/API/FormData/keys
+tags:
+ - API
+ - FormData
+ - Iterator
+ - Method
+ - Reference
+ - XMLHttpRequest API
+translation_of: Web/API/FormData/keys
+---
+<p>{{APIRef("XMLHttpRequest")}}</p>
+
+<p><code><strong>FormData.keys()</strong></code> メソッドは、 {{jsxref("Iteration_protocols",'iterator')}} を返し、このオブジェクトに含まれる全てのキーを通過できるようにします。キーは {{domxref("USVString")}} オブジェクトです。</p>
+
+<div class="note">
+<p><strong>Note</strong>: このメソッドは <a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers</a> で使用できます。</p>
+</div>
+
+<h2 id="構文">構文</h2>
+
+<pre class="syntaxbox notranslate">formData.keys();</pre>
+
+<h3 id="返り値">返り値</h3>
+
+<p>{{jsxref("Iteration_protocols","iterator")}} を返します。</p>
+
+<h2 id="例">例</h2>
+
+<pre class="brush: js;highlight:[7] notranslate">// テストの FormData オブジェクトを作成
+var formData = new FormData();
+formData.append('key1', 'value1');
+formData.append('key2', 'value2');
+
+// キーを表示
+for (var key of formData.keys()) {
+ console.log(key);
+}
+</pre>
+
+<p>結果は次のとおりです:</p>
+
+<pre class="notranslate">key1
+key2</pre>
+
+<h2 id="仕様">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様</th>
+ <th scope="col">ステータス</th>
+ <th scope="col">備考</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('XMLHttpRequest','#dom-formdata','keys() (as iterator&lt;&gt;)')}}</td>
+ <td>{{Spec2('XMLHttpRequest')}}</td>
+ <td>初回定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザー実装状況">ブラウザー実装状況</h2>
+
+
+
+<p>{{Compat("api.FormData.keys")}}</p>
+
+<h2 id="関連項目">関連項目</h2>
+
+<ul>
+ <li>{{domxref("XMLHTTPRequest")}}</li>
+ <li><a href="/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest" title="Using XMLHttpRequest">Using XMLHttpRequest</a></li>
+ <li><a href="/en-US/docs/DOM/XMLHttpRequest/FormData/Using_FormData_Objects" title="DOM/XMLHttpRequest/FormData/Using_FormData_objects">Using FormData objects</a></li>
+ <li>{{HTMLElement("Form")}}</li>
+</ul>