Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();
}
 
PREVIOUS NEXT
Tagged: #How #remove #buttoon #table #js #DOM
ADD COMMENT
Topic
Name
5+8 =