From cb9e359a51c3249d8f5157db69d43fd413ddeda6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:12 +0100 Subject: unslug ca: move --- .../global_objects/string/small/index.html | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 files/ca/web/javascript/reference/global_objects/string/small/index.html (limited to 'files/ca/web/javascript/reference/global_objects/string/small') diff --git a/files/ca/web/javascript/reference/global_objects/string/small/index.html b/files/ca/web/javascript/reference/global_objects/string/small/index.html new file mode 100644 index 0000000000..761797bdda --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/small/index.html @@ -0,0 +1,110 @@ +--- +title: String.prototype.small() +slug: Web/JavaScript/Referencia/Objectes_globals/String/small +translation_of: Web/JavaScript/Reference/Global_Objects/String/small +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode small() crea un element HTML {{HTMLElement("small")}} que causa que una cadena es mostri amb una font petita.

+ +

Sintaxi

+ +
str.small()
+ +

Descripció

+ +

El mètode small() incrusta una adena en una etiqueta <small>: "<small>str</small>".

+ +

Exemples

+ +

Utilitzar small()

+ +

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

+ +
var worldString = 'Hola, món';
+
+console.log(worldString.small());     // <small>Hola, món</small>
+console.log(worldString.big());       // <big>Hola, món</big>
+console.log(worldString.fontsize(7)); // <font size="7">Hola, món</fontsize>
+
+ +

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

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

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-string.prototype.small', 'String.prototype.small')}}{{Spec2('ES6')}}Definició inicial. Implementat en JavaScript 1.0. Definit en l'Annex B (normative) per Característiques Addiccionals d'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