diff options
| author | Florian Dieminger <me@fiji-flo.de> | 2021-02-11 18:26:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-11 18:26:59 +0100 |
| commit | 7a94b4d8daf297eda6df8e5cf933f7ba159bbc76 (patch) | |
| tree | c8c8a36c41beda7a4c150927b2b5c7d2a09837bd /files/pl/web/javascript/reference/global_objects/string/sub/index.html | |
| parent | ab718192b92d5cc38c1114e055a435a6de7dd8ef (diff) | |
| parent | b8170f78422f2269dfc9df7760cc1ad51c048c00 (diff) | |
| download | translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.tar.gz translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.tar.bz2 translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.zip | |
Merge pull request #38 from fiji-flo/unslugging-pl
Unslugging pl
Diffstat (limited to 'files/pl/web/javascript/reference/global_objects/string/sub/index.html')
| -rw-r--r-- | files/pl/web/javascript/reference/global_objects/string/sub/index.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/files/pl/web/javascript/reference/global_objects/string/sub/index.html b/files/pl/web/javascript/reference/global_objects/string/sub/index.html new file mode 100644 index 0000000000..94bfb8722e --- /dev/null +++ b/files/pl/web/javascript/reference/global_objects/string/sub/index.html @@ -0,0 +1,45 @@ +--- +title: String.prototype.sub() +slug: Web/JavaScript/Reference/Global_Objects/String/sub +tags: + - JavaScript + - Method + - Prototype + - String +translation_of: Web/JavaScript/Reference/Global_Objects/String/sub +original_slug: Web/JavaScript/Referencje/Obiekty/String/sub +--- +<p>{{JSRef}}{{deprecated_header}}</p> + +<h2 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h2> + +<p>Powoduje, iż łańcuch zostanie wyświetlony jako indeks dolny tak jakby był wewnątrz znacznika {{HTMLElement("sub")}}.</p> + +<h2 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h2> + +<pre class="syntaxbox"><code><var>str</var>.sub()</code></pre> + +<h2 id="Opis" name="Opis">Opis</h2> + +<p>The <code>sub()</code> method embeds a string in a <code><sub></code> tag: <code>"<sub>str</sub>"</code>.</p> + +<h2 id="Przyk.C5.82ady" name="Przyk.C5.82ady">Przykłady</h2> + +<h4 id="Przyk.C5.82ad:_Zastosowanie_metod_sub_i_sup_do_formatowania_.C5.82a.C5.84cucha_znak.C3.B3w" name="Przyk.C5.82ad:_Zastosowanie_metod_sub_i_sup_do_formatowania_.C5.82a.C5.84cucha_znak.C3.B3w">Przykład: Zastosowanie metod <code>sub()</code> i <code>sup()</code></h4> + +<p>Następujący przykład stosuje metody <code>sub()</code> i {{jsxref("String.prototype.sup()", "sup()")}} do formatowania łańcucha znaków:</p> + +<pre class="brush: js">var superText="superscript"; +var subText="subscript"; + +console.log("This is what a " + superText.sup() + " looks like."); +// This is what a <sup>superscript</sup> looks like + +console.log("This is what a " + subText.sub() + " looks like."); +// This is what a <sub>subscript</sub> looks like.</pre> + +<h2 id="Zobacz_tak.C5.BCe" name="Zobacz_tak.C5.BCe">Zobacz także</h2> + +<ul> + <li>{{jsxref("String.prototype.sup()")}}</li> +</ul> |
