showing results for - "how to make remove buttoon on table using js dom"
Deedee
17 Sep 2018
1   var td5 = document.createElement('td');
2    td5.setAttribute("id", "td5");
3    td5.innerHTML = `<button onclick=remove(this.parentElement)> X </button>`
4    tr.appendChild(td5);
5}
6}
7function remove(element) {
8    element.parentElement.remove(element);
9    console.log(element.parentElement);
10    allMovie.splice(tr, 1);
11    set();
12}
13