Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Internet Explorer
DOM Style APIs
Collections
styleSheets
styleSheets collection

[This documentation is preliminary and is subject to change.]

Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.

Members

The styleSheets collection does not define any members.

Remarks

Style sheets that are imported using the @import rule and are contained within the style object are available through the imports collection.

Examples

This example shows how to display the titles of the style sheets in the document.

for ( i = 0; i < document.styleSheets.length; i++ )
{
    alert("Style sheet " + i + " is titled " + document.styleSheets(i).title);
}

 

 

Build date: 3/14/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Typo?      Shawn Steele - MSFT   |   Edit   |   Show History
alert("Style sheet " + i + " is titled " + document.styleSheets[i].title);
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker