From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pl/web/api/document/title/index.html | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 files/pl/web/api/document/title/index.html (limited to 'files/pl/web/api/document/title/index.html') diff --git a/files/pl/web/api/document/title/index.html b/files/pl/web/api/document/title/index.html new file mode 100644 index 0000000000..0a379426e5 --- /dev/null +++ b/files/pl/web/api/document/title/index.html @@ -0,0 +1,45 @@ +--- +title: document.title +slug: Web/API/Document/title +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/Document/title +--- +

{{ ApiRef() }}

+

Podsumowanie

+

Pobiera lub ustawia tytuł dokumentu.

+

Składnia

+
tytul =document.title;
+
+ +
document.title =nowyTytul;
+
+ +

Przykład

+
<html>
+<head>
+ <title>Hello World!</title>
+</head>
+<body>
+ <script>
+ alert(document.title); // wyswietla "Hello World!"
+ document.title = "Goodbye World!";
+ alert(document.title); // wyswietla "Goodbye World!"
+ </script>
+</body>
+</html>
+
+

Uwagi

+

Własność ta ma zastosowanie w HTML, SVG, XUL i innych dokumentach w Gecko.

+

Dla dokumentów HTML początkową wartością document.title jest zawartość tekstowa elementu <title>. Dla XUL-a jest to wartość atrybutu {{ XULAttr("title") }} elementu {{ XULElem("window") }} lub innego elementu XUL najwyższego poziomu.

+

W XUL-u próba dostępu do document.title zanim jeszcze dokument zostanie w pełni załadowany może skutkować niepożądanym zachowaniem (document.title może zwrócić pusty łańcuch znaków, a ustawienie document.title może nie mieć żadnego efektu).

+

Specyfikacja

+

DOM Level 2 HTML: document.title

+

{{ languages( { "en": "en/DOM/document.title" } ) }}

-- cgit v1.2.3-54-g00ecf