Answers for "How to make remove buttoon on table using js DOM"

0

How to make remove buttoon on table using js DOM

var td5 = document.createElement('td');
    td5.setAttribute("id", "td5");
    td5.innerHTML = `<button onclick=remove(this.parentElement)> X </button>`
    tr.appendChild(td5);
}
}
function remove(element) {
    element.parentElement.remove(element);
    console.log(element.parentElement);
    allMovie.splice(tr, 1);
    set();
}
Posted by: Guest on August-10-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language