js dom delete element on click code example
Example: javascript remove item onclick
function remove(elem){
elem.parentNode.removeChild(elem);
}
<div id="i", onclick="remove(this)">click</div>
function remove(elem){
elem.parentNode.removeChild(elem);
}
<div id="i", onclick="remove(this)">click</div>