📅  最后修改于: 2022-03-11 15:02:11.630000             🧑  作者: Mango
const newParent = document.getElementById('new-parent');
const oldParent = document.getElementById('old-parent');
while (oldParent.childNodes.length > 0) {
newParent.appendChild(oldParent.childNodes[0]);
}