aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/string/sup
diff options
context:
space:
mode:
authorFlorian Dieminger <me@fiji-flo.de>2021-02-11 18:22:05 +0100
committerGitHub <noreply@github.com>2021-02-11 18:22:05 +0100
commit36dd1801df270db5af29576e3ba0c071933e6cca (patch)
treeef4b939a505e2ebd47d22c475db7316f524bfe0d /files/fr/web/javascript/reference/global_objects/string/sup
parentf3460d511f9c648ecfe89f81187ff69ab68fc4a3 (diff)
parent7766d67593cf81cc5d15a77b6dcad98d1b98f6aa (diff)
downloadtranslated-content-36dd1801df270db5af29576e3ba0c071933e6cca.tar.gz
translated-content-36dd1801df270db5af29576e3ba0c071933e6cca.tar.bz2
translated-content-36dd1801df270db5af29576e3ba0c071933e6cca.zip
Merge pull request #31 from fiji-flo/unslugging-fr
Unslugging fr
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/string/sup')
-rw-r--r--files/fr/web/javascript/reference/global_objects/string/sup/index.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/string/sup/index.html b/files/fr/web/javascript/reference/global_objects/string/sup/index.html
new file mode 100644
index 0000000000..c2c2f69ecc
--- /dev/null
+++ b/files/fr/web/javascript/reference/global_objects/string/sup/index.html
@@ -0,0 +1,77 @@
+---
+title: String.prototype.sup()
+slug: Web/JavaScript/Reference/Global_Objects/String/sup
+tags:
+ - Deprecated
+ - HTML wrapper methods
+ - JavaScript
+ - Méthode
+ - Prototype
+ - Reference
+ - String
+translation_of: Web/JavaScript/Reference/Global_Objects/String/sup
+original_slug: Web/JavaScript/Reference/Objets_globaux/String/sup
+---
+<div>{{JSRef}} {{deprecated_header}}</div>
+
+<p>La méthode <code><strong>sup()</strong></code> crée un élément HTML {{HTMLElement("sup")}} qui entraîne l'affichage de la chaîne en exposant.</p>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<pre class="syntaxbox"><var>str</var>.sup()</pre>
+
+<h3 id="Valeur_de_retour">Valeur de retour</h3>
+
+<p>Une chaîne de caractères représentant un élément HTML {{HTMLElement("sup")}}.</p>
+
+<h2 id="Description">Description</h2>
+
+<p>La méthode <code>sup</code> encapsule une chaîne dans une balise <code>&lt;sup&gt;</code> :<br>
+ <code>"&lt;sup&gt;str&lt;/sup&gt;</code>".</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<p>L'exemple suivant utilise les méthodes {{jsxref("String.prototype.sub()", "sub()")}} et <code>sup</code> pour mettre en forme une chaîne :</p>
+
+<pre class="brush: js">var superText = "exposant";
+var subText = "indice";
+
+console.log("Ceci illustre l'affichage d'un texte en " + superText.sup() + ".");
+// Ceci illustre l'affichage d'un texte en &lt;sup&gt;exposant&lt;/sup&gt;.
+console.log("Ceci illustre l'affichage d'un texte en " + subText.sub() + ".");
+Ceci illustre l'affichage d'un texte en &lt;sub&gt;indice&lt;/sub&gt;.
+</pre>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">État</th>
+ <th scope="col">Commentaires</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-string.prototype.sup', 'String.prototype.sup')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Définition initiale. Implémentée avec JavaScript 1.0. Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript additionnelles des navigateurs web.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-string.prototype.sup', 'String.prototype.sup')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td>Définition initiale. Implémentée avec JavaScript 1.0. Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript additionnelles des navigateurs web.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+
+<p class="hidden">Le tableau de compatibilité de cette page a été généré à partir de données structurées. Si vous souhaitez contribuer à ces données, n'hésitez pas à envoyer une <em>pull request</em> sur <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>.</p>
+
+<p>{{Compat("javascript.builtins.String.sup")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>{{jsxref("String.prototype.sub()")}}</li>
+</ul>