Node.cloneNode() (Method)

The node object is cloned but the new instance has no parent node defined.

Availability:

DOM level - 1
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:Node object
JavaScript syntax:-myNode.cloneNode(aSwitch)
Argument list:aSwitchIndicates whether a deep or shallow clone is required