diff options
| author | julieng <julien.gattelier@gmail.com> | 2021-10-02 17:20:24 +0200 |
|---|---|---|
| committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-10-02 17:30:20 +0200 |
| commit | 1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde (patch) | |
| tree | 30a56efd3eff3a01bd1611e1840fdbbfacf544a4 /files/fr/web/api/url/tostring | |
| parent | c05efa8d7ae464235cf83d7c0956e42dc6974103 (diff) | |
| download | translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.gz translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.bz2 translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.zip | |
convert content to md
Diffstat (limited to 'files/fr/web/api/url/tostring')
| -rw-r--r-- | files/fr/web/api/url/tostring/index.md | 66 |
1 files changed, 27 insertions, 39 deletions
diff --git a/files/fr/web/api/url/tostring/index.md b/files/fr/web/api/url/tostring/index.md index f3733e2678..5f61fd9b31 100644 --- a/files/fr/web/api/url/tostring/index.md +++ b/files/fr/web/api/url/tostring/index.md @@ -9,53 +9,41 @@ tags: - toString() translation_of: Web/API/URL/toString --- -<div>{{ApiRef("URL API")}}</div> +{{ApiRef("URL API")}} -<p>La méthode <strong><code>URL.toString()</code></strong> retourne un {{domxref("USVString")}} contenant tout l'URL. C'est en effet, une version de {{domxref("URL.href")}} en lecture seule.</p> +La méthode **`URL.toString()`** retourne un {{domxref("USVString")}} contenant tout l'URL. C'est en effet, une version de {{domxref("URL.href")}} en lecture seule. -<p>{{AvailableInWorkers}}</p> +{{AvailableInWorkers}} -<h2 id="Syntaxe">Syntaxe</h2> +## Syntaxe -<pre class="syntaxbox"><em>string</em> = <em>url</em>.toString();</pre> + string = url.toString(); -<h3 id="Paramètres">Paramètres</h3> +### Paramètres -<p>Aucun.</p> +Aucun. -<h3 id="Valeur_de_retour">Valeur de retour</h3> +### Valeur de retour -<p>Un {{domxref("USVString")}}.</p> +Un {{domxref("USVString")}}. -<h2 id="Examples">Examples</h2> +## Examples -<pre class="brush: js">const url = new URL("https://developer.mozilla.org/en-US/docs/Web/API/URL/toString"); +```js +const url = new URL("https://developer.mozilla.org/en-US/docs/Web/API/URL/toString"); url.toString() // doit retourner l'URL en tant que chaîne -</pre> - -<h2 id="Spécifications">Spécifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Spécification</th> - <th scope="col">Statut</th> - <th scope="col">Commentaire</th> - </tr> - <tr> - <td>{{SpecName('URL', '#URL-stringification-behavior', 'stringifier')}}</td> - <td>{{Spec2('URL')}}</td> - <td>Définition initiale.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p>{{Compat("api.URL.toString")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>L'interface {{domxref("URL")}} à laquelle elle appartient.</li> -</ul> +``` + +## Spécifications + +| Spécification | Statut | Commentaire | +| ---------------------------------------------------------------------------------------- | -------------------- | -------------------- | +| {{SpecName('URL', '#URL-stringification-behavior', 'stringifier')}} | {{Spec2('URL')}} | Définition initiale. | + +## Compatibilité des navigateurs + +{{Compat("api.URL.toString")}} + +## Voir aussi + +- L'interface {{domxref("URL")}} à laquelle elle appartient. |
