I want to know how can I disable and enable the highlighting on an HTML table using Javascript by clicking an html button.
Here are my codes:
tabletest.ht
This will remove the onmouseover events from your tr's.
function disableTable() { var rows = document.getElementsByTagName("tr"); for (var i = 0; i < rows.length; i++) { rows[i].onmouseover= null; } }