var parent = document.getElementById('A'); var child = parent.removeChild(parent.firstChild); var otherParent = document.getElementById('B'); otherParent.appendChild(child);