классы> Как динамически менять свойство класса? > AddRule не меняет свойство типа display
В 6.0 меняет.
<style> .x {color:red} </style>
<button onclick="document.styleSheets[0].addRule('.x','display:none',0)"></button> <button onclick="document.styleSheets[0].removeRule()"></button>
<p class=x>x</p> <p>y</p> <p class=x>x</p> <p>y</p> <p class=x>x</p> <p>y</p> |