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

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

Retrieves a collection of all the imported style sheets defined for the respective styleSheet object.

Members

The imports collection does not define any members.

Remarks

An imported style sheet is one that is brought into the document using the cascading style sheets (CSS) @import rule.

Examples

This example shows how to display the URL paths of the imported style sheets in the document.

for ( i = 0; i < document.styleSheets.length; i++ )
{
    if ( document.styleSheets(i).owningElement.tagName == "STYLE" )
    {
        for ( j = 0; j < document.styleSheets(i).imports.length; j++ )
            alert("Imported style sheet " + j + " is at " +
                   document.styleSheets(i).imports(j).href);
    }
}

 

 

Build date: 3/14/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
How to display the URL paths of the imported style sheets in the document.      kaka0914   |   Edit   |   Show History
see above code example
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