Javascript input listener

I have a table of products ordered by the value of the last column of each row. I want that when I click on an input, the corresponding checkbox change directly to selected. In this way, when I click …

addEventListener vs onclick

What’s the difference between addEventListener and onclick? var h = document.getElementById(“a”); h.onclick = dothing1; h.addEventListener(“click”, dothing2); The code above resides together in a …