String.prototype.big()
Deprecated
Avoid using this feature in new projects. HTML wrapper methods exist only for backwards compatibility. Use DOM APIs to create elements instead. This feature may be a candidate for removal from web standards or browsers.>
Consider using the following features instead: DOM.>
La méthode big() crée un élément HTML <big> qui affichera la chaine de caractères avec une taille de police importante.
Syntaxe
str.big();
Valeur de retour
Une chaîne de caractères qui représente un élément HTML <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 :
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 element.style, il est possible d'accéder à l'attribut style de l'élément et de le manipuler. Par exemple :
document.getElementById("idÉlément").style.fontSize = "2em";
Spécifications
| Spécification |
|---|
| ECMAScript® 2027 Language Specification> # sec-string.prototype.big> |