Export (0) Print
Expand All
go
Expand Minimize

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.4Internet Explorer 9

 

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.

ppNodeDest [out, retval]

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.

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

 

 

Show:
© 2014 Microsoft