From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/it/web/api/document/firstchild/index.html | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 files/it/web/api/document/firstchild/index.html (limited to 'files/it/web/api/document/firstchild/index.html') diff --git a/files/it/web/api/document/firstchild/index.html b/files/it/web/api/document/firstchild/index.html new file mode 100644 index 0000000000..ed5a34a883 --- /dev/null +++ b/files/it/web/api/document/firstchild/index.html @@ -0,0 +1,40 @@ +--- +title: document.firstChild +slug: Web/API/Document/firstChild +translation_of: Web/API/Node/firstChild +--- +
{{APIRef("DOM")}}
+ +

document.firstChild restituisce il primo nodo figlio del documento.

+ +

Sintassi

+ +
child = document.firstChild
+
+ +

Parametri

+ + + +

Esempio

+ +
function primoFiglio() {
+  f = document.firstChild;
+  alert(f.tagName);
+}
+// restituisce [object DocumentType] se il documento ha una DTD
+// altrimenti restituisce "HTML"
+
+// Per un documento HTML che ha una DTD
+// document.firstChild
+// restituisce [object DocumentType]
+
+
+ +

Specifiche

+ +

DOM Level 2 Core: firstChild

+ +

{{ languages( { "pl": "pl/DOM/document.firstChild" } ) }}

-- cgit v1.2.3-54-g00ecf