From de5c456ebded0e038adbf23db34cc290c8829180 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:49:24 +0100 Subject: unslug pl: move --- .../global_objects/string/anchor/index.html | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 files/pl/web/javascript/reference/global_objects/string/anchor/index.html (limited to 'files/pl/web/javascript/reference/global_objects/string/anchor') diff --git a/files/pl/web/javascript/reference/global_objects/string/anchor/index.html b/files/pl/web/javascript/reference/global_objects/string/anchor/index.html new file mode 100644 index 0000000000..737c385889 --- /dev/null +++ b/files/pl/web/javascript/reference/global_objects/string/anchor/index.html @@ -0,0 +1,56 @@ +--- +title: String.prototype.anchor() +slug: Web/JavaScript/Referencje/Obiekty/String/anchor +tags: + - JavaScript + - Method + - Prototype + - String +translation_of: Web/JavaScript/Reference/Global_Objects/String/anchor +--- +

{{JSRef}}

+ +

Podsumowanie

+ +

Tworzy kotwicę HTML {{HTMLElement("a")}} do użycia jako cel odnośnika.

+ +

Składnia

+ +
str.anchor(name)
+ +

Parametry

+ +
+
name
+
Łańcuch znaków.
+
+ +

Opis

+ +

Use the anchor() method to programmatically create and display an anchor in a document.

+ +

W składni łańcuch znaków reprezentuje literał tekstowy, który ma zobaczyć użytkownik. Łańcuch name reprezentuje atrybut name znacznika a.

+ +

Kotwice stworzone za pomocą metody anchor stają się elementami tablicy document.anchors.

+ +

Przykłady

+ +

Przykład: Zastosowanie anchor()

+ +

Następujący przykład wewnątrz kodu HTML elementu script:

+ +
var myString = "Tabela zawartości";
+
+document.body.innerHTML = myString.anchor("contents_anchor");
+
+ +

spowoduje otrzymanie na wyjściu kodu HTML:

+ +
<a name="contents_anchor">Tabela zawartości</a>
+
+ +

Zobacz także

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