HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The following code fragment loads "books.xml", clones the first <book> node and then adds it to the end of the node list
The cloneNode() method creates a copy of a node, and returns the newly clone node.
The cloneNode() method is supported in all major browsers.
nodeObject.cloneNode(deep)
Parameter | Type | Description |
---|---|---|
deep | Boolean | true clones the node, its attributes, and its descendants.
false clones the node and its attributes. |
Type | Description |
---|---|
Node object | The cloned node |
DOM Version | Core Level 1 Node Object |
---|
❮ Node Object