Mega Code Archive

 
Categories / JavaScript Reference / Javascript Methods
 

RemoveRule() Example

<html> <body> <style>.myClass {background-color:red; font-decoration:bold;}</style> <script language="JavaScript">     function function1() {         document.styleSheets[0].removeRule(0);     } </script> <button id="myB" onclick="function1();" class="myClass">Remove rule</button> </body> </html>