aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/javascript/reference/global_objects/string/link
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 14:49:24 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 14:49:24 +0100
commitde5c456ebded0e038adbf23db34cc290c8829180 (patch)
tree2819c07a177bb7ec5f419f3f6a14270d6bcd7fda /files/pl/web/javascript/reference/global_objects/string/link
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-de5c456ebded0e038adbf23db34cc290c8829180.tar.gz
translated-content-de5c456ebded0e038adbf23db34cc290c8829180.tar.bz2
translated-content-de5c456ebded0e038adbf23db34cc290c8829180.zip
unslug pl: move
Diffstat (limited to 'files/pl/web/javascript/reference/global_objects/string/link')
-rw-r--r--files/pl/web/javascript/reference/global_objects/string/link/index.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/files/pl/web/javascript/reference/global_objects/string/link/index.html b/files/pl/web/javascript/reference/global_objects/string/link/index.html
new file mode 100644
index 0000000000..6d8baeb078
--- /dev/null
+++ b/files/pl/web/javascript/reference/global_objects/string/link/index.html
@@ -0,0 +1,43 @@
+---
+title: String.prototype.link()
+slug: Web/JavaScript/Referencje/Obiekty/String/link
+tags:
+ - JavaScript
+ - Method
+ - Prototype
+ - String
+translation_of: Web/JavaScript/Reference/Global_Objects/String/link
+---
+<p>{{JSRef}}</p>
+
+<h2 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h2>
+
+<p>Tworzy <a class="external" href="http://www.w3.org/TR/html401/struct/links.html#adef-href">łącze hipertekstowe</a>, które wywołuje inny URL.</p>
+
+<h2 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h2>
+
+<pre class="syntaxbox"><code><var>str</var>.link(<var>url</var>)</code></pre>
+
+<h3 id="Parametry" name="Parametry">Parametry</h3>
+
+<dl>
+ <dt><code>url</code></dt>
+ <dd>Jakikolwiek łańcuch określony w <code>href</code> ze znacznika <code>a</code>; powinien być umieszczany poprawny URL (relatywny lub absolutny).</dd>
+</dl>
+
+<h2 id="Opis" name="Opis">Opis</h2>
+
+<p>Linki tworzymy poprzez metodę <code>link</code> stającą się elementami tablicy <code>links</code> z obiektu <code>document</code>. Zobacz <code>document.links</code>.</p>
+
+<h2 id="Przyk.C5.82ady" name="Przyk.C5.82ady">Przykłady</h2>
+
+<h3 id="Przyk.C5.82ad:_Zastosowanie_link" name="Przyk.C5.82ad:_Zastosowanie_link">Przykład: Zastosowanie <code>link()</code></h3>
+
+<p>Następujący przykład wyświetla słowo "MDN" jako odnośnik hipertekstowy, poprzez który użytkownik będzie mógł przejść na stronę domową Netscape:</p>
+
+<pre class="brush: js">var hotText="MDN";
+var URL="<code class="language-js"><span class="token string">https://developer.mozilla.org/</span></code>";
+
+console.log("Kliknij, aby powrócić do " + hotText.link(URL));
+// Kliknij, aby powrócić do &lt;a href="https://developer.mozilla.org"&gt;MDN&lt;/a&gt;
+</pre>