/html-dom /Basic
GitHub 5008★

Replace an element

The ele will be removed from the DOM tree, and is replaced with newEle:

ele.parentNode.replaceChild(newEle, ele);
Follow me on and to get more useful contents.