aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/urlsearchparams/entries
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/api/urlsearchparams/entries
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/api/urlsearchparams/entries')
-rw-r--r--files/fr/web/api/urlsearchparams/entries/index.html67
1 files changed, 67 insertions, 0 deletions
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
+---
+<p>{{APIRef("URL API")}}{{SeeCompatTable}}</p>
+
+<p>La méthode <code><strong>URLSearchParams.entries()</strong></code> 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")}} .</p>
+
+<div class="note">
+<p><strong>Note</strong>: This method is available in <a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers</a>.</p>
+</div>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">searchParams.entries();</pre>
+
+<h3 id="Return_value">Return value</h3>
+
+<p>Returns an {{jsxref("Iteration_protocols","iterator")}}.</p>
+
+<h2 id="Example">Example</h2>
+
+<pre class="brush: js;highlight:[5]">// Create a test URLSearchParams object
+var searchParams = new URLSearchParams("key1=value1&amp;key2=value2");
+
+// Display the key/value pairs
+for(var pair of searchParams.entries()) {
+ console.log(pair[0]+ ', '+ pair[1]);
+}
+</pre>
+
+<p>The result is:</p>
+
+<pre>key1, value1
+key2, value2</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('URL', '#urlsearchparams','entries() (as iterator&lt;&gt;)')}}</td>
+ <td>{{Spec2('URL')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("api.URLSearchParams.entries")}}</p>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>Other URL-related interfaces: {{domxref("URL")}}, {{domxref("URLUtils")}}.</li>
+</ul>