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/importnode/index.html | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 files/it/web/api/document/importnode/index.html (limited to 'files/it/web/api/document/importnode') diff --git a/files/it/web/api/document/importnode/index.html b/files/it/web/api/document/importnode/index.html new file mode 100644 index 0000000000..354db3c0c8 --- /dev/null +++ b/files/it/web/api/document/importnode/index.html @@ -0,0 +1,45 @@ +--- +title: document.importNode +slug: Web/API/Document/importNode +translation_of: Web/API/Document/importNode +--- +
{{APIRef("DOM")}}
+ +

Restituisce un clone di un nodo preso da un documento esterno.

+ +

Sintassi

+ +
nodo =
+document.importNode(
+nodoEsterno,
+bool)
+
+ + + +

Esempio

+ +
var iframe = document.getElementsByTagName("iframe")[0];
+var vecchioNodo = iframe.contentDocument.getElementById("mioNodo");
+var nuovoNodo = document.importNode(vecchioNodo,true);
+document.getElementById("contenitore").appendChild(nuovoNodo);
+
+ +

Note

+ +

Il nodo non viene rimosso dal documento originale. Il nodo importato è un clone dell'originale. I nodi presi dai documenti esterni devono essere importati prima di poter essere inseriti nel documento corrente.

+ +

http://www.w3.org/DOM/faq.html#ownerdoc

+ +

Specifiche

+ +

DOM Level 2 Core: Document.importNode

+ +

{{ languages( { "fr": "fr/DOM/document.importNode" } ) }}

-- cgit v1.2.3-54-g00ecf