Availability
DOM Level 2 CSS
Properties
readonly unsigned long length
The number
of CSSRule objects in this CSSRuleList array.
Methods
item( )
Returns the CSSRule object at the specified position. Instead of
explicitly calling this method, JavaScript allows you to simply treat
the CSSRuleList object as an array and to index it using standard
square-bracket array notation. If the specified index is too large,
this method returns null.
Description
This interface defines a read-only ordered list (i.e., an array) of
CSSRule objects. The length property specifies the
number of rules in the list, and the item( )
method allows you to retrieve the rule at a specified position. In
JavaScript, CSSRuleList objects behave like JavaScript arrays, and
you can query an element from the list using square-bracket array
notation instead of calling the item( ) method.
(Note, however, that you cannot assign new nodes into a CSSRuleList
using square brackets.)
See Also
Type of
CSSMediaRule.cssRules, CSSStyleSheet.cssRules
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.