diff options
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/string/big')
| -rw-r--r-- | files/fr/web/javascript/reference/global_objects/string/big/index.html | 80 | ||||
| -rw-r--r-- | files/fr/web/javascript/reference/global_objects/string/big/index.md | 65 |
2 files changed, 65 insertions, 80 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/string/big/index.html b/files/fr/web/javascript/reference/global_objects/string/big/index.html deleted file mode 100644 index 0cefdf7fab..0000000000 --- a/files/fr/web/javascript/reference/global_objects/string/big/index.html +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: String.prototype.big() -slug: Web/JavaScript/Reference/Global_Objects/String/big -tags: - - Dépréciée - - JavaScript - - Méthode - - Prototype - - Reference - - String -translation_of: Web/JavaScript/Reference/Global_Objects/String/big -original_slug: Web/JavaScript/Reference/Objets_globaux/String/big ---- -<div>{{JSRef}}{{deprecated_header}}</div> - -<p>La méthode <code><strong>big()</strong></code> crée un élément HTML {{HTMLElement("big")}} qui affichera la chaine de caractères avec une taille de police importante.</p> - -<div class="note"> -<p><strong>Note :</strong> L'élément <code><big></code> a été retiré de <a href="/fr/docs/Web/Guide/HTML/HTML5">HTML5</a> et ne doit pas être utilisé. À la place, les développeurs web doivent utiliser les propriétés <a href="/fr/docs/Web/CSS">CSS</a>.</p> -</div> - -<h2 id="Syntaxe">Syntaxe</h2> - -<pre class="syntaxbox"><var>str</var>.big()</pre> - -<h3 id="Valeur_de_retour">Valeur de retour</h3> - -<p>Une chaîne de caractères qui représente un élément HTML {{HTMLElement("big")}}.</p> - -<h2 id="Description">Description</h2> - -<p>La méthode <code>big()</code> place la chaine de caractères dans une balise <code><big></code> :<br> - <code>"<big>str</big></code>"</p> - -<h2 id="Exemples">Exemples</h2> - -<p>L'exemple suivant montre les méthodes de <code>String</code> pour changer la taille d'une chaine de caractères :</p> - -<pre class="brush:js">var chaîneMonde = "Coucou monde"; - -console.log( chaîneMonde.small() ); // <small>Coucou monde</small> -console.log( chaîneMonde.big() ); // <big>Coucou monde</big> -console.log( chaîneMonde.fontsize(7) ); // <fontsize=7>Coucou monde</fontsize></pre> - -<p>Avec l'objet {{domxref("HTMLElement.style", "element.style")}}, il est possible d'accéder à l'attribut <code>style</code> de l'élément et de le manipuler. Par exemple :</p> - -<pre class="brush: js">document.getElementById('idÉlément').style.fontSize = '2em'</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.big', 'String.prototype.big')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Définition initiale. Implémentée dans JavaScript 1.0. Définie dans l'annexe normative pour les fonctionnalités supplémentaires des navigateurs web.</td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-string.prototype.big', 'String.prototype.big')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td>Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript supplémentaires des navigateurs web.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p>{{Compat("javascript.builtins.String.big")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>{{jsxref("String.prototype.fontsize()")}}</li> - <li>{{jsxref("String.prototype.small()")}}</li> -</ul> diff --git a/files/fr/web/javascript/reference/global_objects/string/big/index.md b/files/fr/web/javascript/reference/global_objects/string/big/index.md new file mode 100644 index 0000000000..ab956a9e8d --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/string/big/index.md @@ -0,0 +1,65 @@ +--- +title: String.prototype.big() +slug: Web/JavaScript/Reference/Global_Objects/String/big +tags: + - Dépréciée + - JavaScript + - Méthode + - Prototype + - Reference + - String +translation_of: Web/JavaScript/Reference/Global_Objects/String/big +original_slug: Web/JavaScript/Reference/Objets_globaux/String/big +--- +{{JSRef}}{{deprecated_header}} + +La méthode **`big()`** crée un élément HTML {{HTMLElement("big")}} qui affichera la chaine de caractères avec une taille de police importante. + +> **Note :** L'élément `<big>` a été retiré de [HTML5](/fr/docs/Web/Guide/HTML/HTML5) et ne doit pas être utilisé. À la place, les développeurs web doivent utiliser les propriétés [CSS](/fr/docs/Web/CSS). + +## Syntaxe + + str.big() + +### Valeur de retour + +Une chaîne de caractères qui représente un élément HTML {{HTMLElement("big")}}. + +## Description + +La méthode `big()` place la chaine de caractères dans une balise `<big>` : +`"<big>str</big>`" + +## Exemples + +L'exemple suivant montre les méthodes de `String` pour changer la taille d'une chaine de caractères : + +```js +var chaîneMonde = "Coucou monde"; + +console.log( chaîneMonde.small() ); // <small>Coucou monde</small> +console.log( chaîneMonde.big() ); // <big>Coucou monde</big> +console.log( chaîneMonde.fontsize(7) ); // <fontsize=7>Coucou monde</fontsize> +``` + +Avec l'objet {{domxref("HTMLElement.style", "element.style")}}, il est possible d'accéder à l'attribut `style` de l'élément et de le manipuler. Par exemple : + +```js +document.getElementById('idÉlément').style.fontSize = '2em' +``` + +## Spécifications + +| Spécification | État | Commentaires | +| ---------------------------------------------------------------------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| {{SpecName('ES6', '#sec-string.prototype.big', 'String.prototype.big')}} | {{Spec2('ES6')}} | Définition initiale. Implémentée dans JavaScript 1.0. Définie dans l'annexe normative pour les fonctionnalités supplémentaires des navigateurs web. | +| {{SpecName('ESDraft', '#sec-string.prototype.big', 'String.prototype.big')}} | {{Spec2('ESDraft')}} | Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript supplémentaires des navigateurs web. | + +## Compatibilité des navigateurs + +{{Compat("javascript.builtins.String.big")}} + +## Voir aussi + +- {{jsxref("String.prototype.fontsize()")}} +- {{jsxref("String.prototype.small()")}} |
