imports Collection

DHTML, HTML, & CSS

imports Collection


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

Syntax

[ collImports = ] styleSheet.imports
[ oObject = ] styleSheet.imports(iIndex)

Possible Values

collImports Array of imported style sheets.
oObject Reference to an individual item in the array of elements contained by the object.
iIndex Required. Integer that indicates the zero-based index of the item to be returned.

Members

Remarks

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

Example

This example shows how to display the URLs 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);
    }
}

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.

styleSheet


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.