Answers for "remove element onclick javascript"

1

javascript remove item onclick

function remove(elem){
  elem.parentNode.removeChild(elem);
}
<div id="i", onclick="remove(this)">click</div>
Posted by: Guest on October-02-2020
1

remove element onclick javascript

function remove(el) {
  var element = el;
  element.remove();
}
Posted by: Guest on February-10-2021

Code answers related to "remove element onclick javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language