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

{{APIRef("URL API")}}{{SeeCompatTable}}

+ +

La méthode URLSearchParams.entries() retourne  un itérateur( {{jsxref("Iteration_protocols",'iterator')}}) permettant de parcourir les paires de clé/valeur contenues dans cet objet. La clé et la valeur de chaque paire est un objet  {{domxref("USVString")}} .

+ +
+

Note: This method is available in Web Workers.

+
+ +

Syntax

+ +
searchParams.entries();
+ +

Return value

+ +

Returns an {{jsxref("Iteration_protocols","iterator")}}.

+ +

Example

+ +
// Create a test URLSearchParams object
+var searchParams = new URLSearchParams("key1=value1&key2=value2");
+
+// Display the key/value pairs
+for(var pair of searchParams.entries()) {
+   console.log(pair[0]+ ', '+ pair[1]);
+}
+
+ +

The result is:

+ +
key1, value1
+key2, value2
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('URL', '#urlsearchparams','entries() (as iterator<>)')}}{{Spec2('URL')}}Initial definition
+ +

Browser compatibility

+ +
+ + +

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

+
+ +

See also

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