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 --- .../reference/global_objects/string/sup/index.html | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 files/ca/web/javascript/reference/global_objects/string/sup/index.html (limited to 'files/ca/web/javascript/reference/global_objects/string/sup') diff --git a/files/ca/web/javascript/reference/global_objects/string/sup/index.html b/files/ca/web/javascript/reference/global_objects/string/sup/index.html new file mode 100644 index 0000000000..24b46c88ce --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/string/sup/index.html @@ -0,0 +1,107 @@ +--- +title: String.prototype.sup() +slug: Web/JavaScript/Referencia/Objectes_globals/String/sup +translation_of: Web/JavaScript/Reference/Global_Objects/String/sup +--- +
{{JSRef}} {{deprecated_header}}
+ +

El mètode sup() crea un element HTML {{HTMLElement("sup")}} que causa que la cadena es mostri com un superíndex.

+ +

Sintaxi

+ +
str.sup()
+ +

Descripció

+ +

El mètode sup() incrusta una cadena en l'etiqueta <sup>:"<sup>str</sup>".

+ +

Exemples

+ +

Utilitzar els mètodes sub() i sup()

+ +

L'exemple següent utilitza els mètodes {{jsxref("String.prototype.sub()", "sub()")}} i sup() per formatejar la cadena:

+ +
var superText = 'superíndex';
+var subText = 'subíndex';
+
+console.log('This is what a ' + superText.sup());
+// "Així es com es veu un <sup>superíndex</sup>."
+
+console.log('This is what a ' + subText.sub());
+// "Així es com es veu un <sub>subíndex</sub>."
+
+ +

Especificacions

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