De CSSStyleSheet.deleteRule() methode verwijdert een stijlregel van het pas gebruikte CSS bestand.




  • Index is een lang nummer dat de positie van regel aangeeft.

Teruggekeerde waarde

Void. (Niets)




Specificatie Status Comment
CSS Object Model (CSSOM)
The definition of 'CSSStyleSheet.deleteRule()' in that specification.
Working Draft  
Document Object Model (DOM) Level 2 Style Specification
The definition of 'CSSStyleSheet.deleteRule()' in that specification.
Obsolete Eerste definitie

Browser compatibiliteit

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basis support (Yes) (Yes) 9.0 (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile

Basis support

(Yes) (Yes) (Yes) (Yes) (Yes)

Legacy browser support

  • Internet Explorer - pre v9

    removeRule([index]);  --  Example: removeRule(); // remove first rule

    Also note the non-standard addRule() and .rules instead of insertRule() and .cssRules respectively.

Zie ook