javascript delete clicked on element code example Example: remove element onclick javascript function remove(el) { var element = el; element.remove(); }