Remove an element

1. Use the remove method

Note that the remove method isn't supported in Internet Explorer.

ele.remove();

2. Use the removeChild method

if (ele.parentNode) {
ele.parentNode.removeChild(ele);
}

More

Previous
Reload the current page
Next
Replace an element