// Get the element var elem = document.querySelector('#elem1'); // Create a copy of it var clone = elem.cloneNode(true);