styleSheets, StyleSheetListNN 6 IE 4 DOM 2  

  

A collection of styleSheet objects that are members of a document object. The W3C DOM abstract representation of this collection is called a StyleSheetList object. Members of this collection are accessed via their integer index number, but you may iterate through the collection and examine properties of each style sheet object (such as the selectorText property) to distinguish one rule from another.

 
Object Model Reference
 
document.styleSheets
 
Object-Specific Properties

length

 
Object-Specific Methods

item( )

 
Object-Specific Event Handler Properties

None.

lengthNN 6 IE 4 DOM 2  

Read-only  

Returns the number of elements in the collection.

 
Example
 
var howMany = document.styleSheets.length;
 
Value

Integer.

item( )NN 6 IE 4 DOM 2  

item(index)

  

Returns a styleSheet object corresponding to the object matching the index value in source code order.

 
Parameters
 
  • A zero-based integer corresponding to the specified item in source code order (nested within the current document object).
 
Returned Value

Reference to a styleSheet object. If there are no matches to the parameters, the returned value is null.