I have, for example, this CSS rules:
<style>
table {background:red;}
div {background:green;}
</style>
and the following HTML, calling a JS function:
<table onclick="turnItsCSS(on/off)"><tr><td>123</td></tr></table>
Is it possible for turnItsCSS()
to toggle CSS rules for tables?
All I figured is to parse innerHTML
in document head
, but it doesn't seem to be sufficient.