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
Follow this recipe:
Define two sets of CSS rules. One set of rules always starts with table.enabled, the other with table.disabled
To enable/disable the whole table, locate the DOM element (using document.getElementbyId('tblTest') when the table has the id tblTest) and assign the respective class:
document.getElementbyId('tblTest').classname = enabled ? 'enabled' : 'disabled';