📅  最后修改于: 2022-03-11 15:03:18.027000             🧑  作者: Mango
// Get the element
var elem = document.querySelector('#elem1');
// Create a copy of it
// The 'true' is to allow nested elements to be copied as well
var clone = elem.cloneNode(true);