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

{{APIRef("URL API")}}

+ +

{{domxref("URLSearchParams")}} インターフェイスの entries() メソッドは、このオブジェクトに含まれるすべてのキー/値のペアを反復処理できる {{jsxref("Iteration_protocols","iterator")}} を返します。 各ペアのキーと値は {{domxref("USVString")}} オブジェクトです。

+ +

{{availableinworkers}}

+ +

構文

+ +
searchParams.entries();
+ +

パラメーター

+ +

なし。

+ +

戻り値

+ +

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

+ +

+ +
// テスト用の URLSearchParams オブジェクトの作成
+var searchParams = new URLSearchParams("key1=value1&key2=value2");
+
+// キー/値のペアの表示
+for(var pair of searchParams.entries()) {
+   console.log(pair[0]+ ', '+ pair[1]);
+}
+
+ +

結果は次のとおりです。

+ +
key1, value1
+key2, value2
+ +

仕様

+ + + + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('URL', '#interface-urlsearchparams', "entries() (see \"iterable\")")}}{{Spec2('URL')}}初期定義
+ +

ブラウザーの互換性

+ +
+ + +

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

+
+ +

関連項目

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