How to remove the parent element using plain Javascript
You can now use node.remove()
to remove the whole element
so in your case you'd do
function delete_row(e) {
e.parentElement.remove();
}
You can read more on it here https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove
Change your function like this:
function delete_row(e)
{
e.parentNode.parentNode.parentNode.removeChild(e.parentNode.parentNode);
}