Document.styleSheets[] (Collection)

An array containing a list of style sheets in an MSIE document.


DOM level - 1
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:styleSheets object
JavaScript syntax:-myDocument.styleSheets
HTML syntax:<LINK>

This property yields a styleSheets array that contains a collection of objects that represent any style sheets currently used by the document. These style sheets are called into the document with the <LINK> tag.

The core style sheet model for both MSIE and Netscape is fundamentally the same. However, the style sheet management is done in a completely different way in MSIE and Netscape, prior to version 6.0.

The MSIE technique appears to be far easier to operate on and you can quite easily build algorithmic techniques to locate exactly the style object you want to. In Netscape 4, the CSS styling appears to have been added as an interface to an underlying JSS styling model that is far more cumbersome.

As of Netscape 6.0, the JSS support is deprecated and a DOM-based Style object like the one in MSIE now provides a more consistent way to operate on styles.


See also:Document object, rule object, StyleSheet object, StyleSheetList object

Property attributes: