how to add onclick remove function in dom javascript 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>