JavaScript: The Definitive Guide

25.52. CSSStyleSheet.addRule( ): IE-specific method to insert a rule into a stylesheet

IE 4:

25.52.1. Synopsis

void addRule(String selector, String style, integer index)

25.52.1.1. Arguments

selector

The CSS selector for the rule.

style

The styles to be applied to elements that match the selector. This style string is a semicolon-delimited list of attribute:value pairs. It does not begin and end with curly braces.

index

The position in the rules array at which the rule is to be inserted or appended. If this optional argument is omitted, the new rule is appended to the array of rules.

25.52.2. Description

This method inserts (or appends) a new CSS style rule at the specified index of the rules array of this stylesheet. This is an IE-specific alternative to the standard insertRule( ) method. Note that the arguments to this method are different from those to insertRule( ).

Категории