Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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; }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #element #parent #element #javascript
ADD COMMENT
Topic
Name
1+7 =