diff options
author | julieng <julien.gattelier@gmail.com> | 2021-10-02 17:20:14 +0200 |
---|---|---|
committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-10-02 17:30:20 +0200 |
commit | c05efa8d7ae464235cf83d7c0956e42dc6974103 (patch) | |
tree | 6ea911b2f2010f63a026de6bb7a1a51e7690a7e1 /files/fr/web/api/urlsearchparams/entries/index.md | |
parent | 13a5e017558b248ee1647d4a5825f183b51f09ad (diff) | |
download | translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.gz translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.bz2 translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.zip |
move *.html to *.md
Diffstat (limited to 'files/fr/web/api/urlsearchparams/entries/index.md')
-rw-r--r-- | files/fr/web/api/urlsearchparams/entries/index.md | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/files/fr/web/api/urlsearchparams/entries/index.md b/files/fr/web/api/urlsearchparams/entries/index.md new file mode 100644 index 0000000000..4f10b1bb12 --- /dev/null +++ b/files/fr/web/api/urlsearchparams/entries/index.md @@ -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">// 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]); +} +</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<>)')}}</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> |