EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

importNode method

Imports a node from another document into the the document that the document object displays.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4

 

Syntax

var ppNodeDest = document.importNode(pNodeSource, fDeep);

Parameters

pNodeSource [in]

Type: IHTMLDOMNode

A reference to the element object that refers to the node to move.

fDeep [in]

Type: Boolean

true (true)

Child nodes of the node specified by the pNodeSourceparameter are also imported.

false (true)

Child nodes of the node specified by the pNodeSourceparameter are not imported.

Return value

Type: IHTMLDOMNode3

A reference to the element object that refers to the node that has been imported, or a null value if the node cannot be imported.

Standards information

Examples

The following code example illustrates the importNode method.


var oNode = document.importNode( oXHTMLNode, FALSE );
parent.appendChild( oNode );

See also

document

 

 

Mostrar:
© 2015 Microsoft