how to remove child nodes from a parent node in javascript code example
Example: how to remove an element from a parent element javascript
function removeElement(el) {
el.parentNode.removeChild(el);
}
// or
HTMLElement.prototype.remove = function() { this.parentNode.removeChild(this); return this; }