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/firstchild/index.html | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 files/pl/web/api/document/firstchild/index.html (limited to 'files/pl/web/api/document/firstchild/index.html') diff --git a/files/pl/web/api/document/firstchild/index.html b/files/pl/web/api/document/firstchild/index.html new file mode 100644 index 0000000000..c2bc145b41 --- /dev/null +++ b/files/pl/web/api/document/firstchild/index.html @@ -0,0 +1,36 @@ +--- +title: document.firstChild +slug: Web/API/Document/firstChild +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/Node/firstChild +--- +

{{ ApiRef() }}

+

Podsumowanie

+

document.firstChild zwraca pierwszy węzeł z listy bezpośrednich dzieci dokumentu.

+

Składnia

+
dziecko = document.firstChild
+
+

Parametry

+ +

Przykład

+
function fChild() {
+  f = document.firstChild;
+  alert(f.tagName);
+}
+// wyświetli: HTML
+
+

Uwagi

+

Zauważ, że możesz powrócić do drzewa DOM z tą własnością, by przejąć te węzły potomne, których potrzebujesz, ponieważ prawie zawsze firstChild zwraca element HTML.

+

Specyfikacja

+

firstChild

+

 

+

 

+
+  
+

{{ languages( { "en": "en/DOM/document.firstChild", "es": "es/DOM/document.firstChild", "fr": "fr/DOM/document.firstChild", "ja": "ja/DOM/document.firstChild" } ) }}

-- cgit v1.2.3-54-g00ecf