HTML DOM Element cloneNode()
HTML DOM Element cloneNode() Method
The cloneNode() method is used for creating copies of a node and returning it. It clones all of its attributes and values. By setting its deep parameter to true, it will clone its children.
Syntax:-
Its syntax is:- node.cloneNode(deep)
Return:-
Its return is:- cloned node