Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

deleteRule Redirect 1

« deleteRule

The CSSStyleSheet.deleteRule() method removes a style rule from the current style sheet object.

Syntax

stylesheet.deleteRule(index) 

Parameters

  • index is a long number representing the position of the rule.

Example

 myStyles.deleteRule(0);

See also

Specification

deleteRule

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,