I would like to remove the parent without removing the child - is this possible?
HTML structure:
相关标签:
Surprised that nobody's posting the simplest answer:
// Find your wrapper HTMLElement var wrapper = document.querySelector('.wrapper'); // Replace the whole wrapper with its own contents wrapper.outerHTML = wrapper.innerHTML;