From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- .../objectes_globals/string/big/index.html | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 files/ca/web/javascript/referencia/objectes_globals/string/big/index.html (limited to 'files/ca/web/javascript/referencia/objectes_globals/string/big') diff --git a/files/ca/web/javascript/referencia/objectes_globals/string/big/index.html b/files/ca/web/javascript/referencia/objectes_globals/string/big/index.html new file mode 100644 index 0000000000..a3b8815f10 --- /dev/null +++ b/files/ca/web/javascript/referencia/objectes_globals/string/big/index.html @@ -0,0 +1,114 @@ +--- +title: String.prototype.big() +slug: Web/JavaScript/Referencia/Objectes_globals/String/big +translation_of: Web/JavaScript/Reference/Global_Objects/String/big +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode big() crea un element HTML {{HTMLElement("big")}} que causa que la cadena es mostri en una font de mida gran.

+ +
+

Nota d'ús: L'element <big> s'ha eliminat de l'HTML5 i no s'hauria de fer servir més. S'aconsella als desenvolupadors web utilitzar les propietats de CSS.

+
+ +

Sintaxi

+ +
str.big()
+ +

Descripció

+ +

El mètode big() incrusta una cadena dins del tag <big>: "<big>str</big>".

+ +

Exemples

+ +

Utilitzar big()

+ +

L'exemple següent utilitza mètodes string per canviar la mida d'una cadena:

+ +
var worldString = 'Hello, world';
+
+console.log(worldString.small());     // <small>Hello, world</small>
+console.log(worldString.big());       // <big>Hello, world</big>
+console.log(worldString.fontsize(7)); // <fontsize=7>Hello, world</fontsize>
+
+ +

Amb l'objecte {{domxref("HTMLElement.style", "element.style")}} es pot obtenir l'atribut style de l'element i manipular-lo més genèricament, per exemple:

+ +
document.getElementById('yourElemId').style.fontSize = '2em';
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.big', 'String.prototype.big')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per característiques addicionals ECMAScript per navegadors web.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Vegeu també

+ + -- cgit v1.2.3-54-g00ecf