styleSheetsstyleSheets*
*



Contents  *



Index  *Topic Contents
*Previous Topic: scripts
*Next Topic: tbodies

styleSheets

Description

Retrieves a collection of styleSheets objects representing the style sheets corresponding to each instance of a LINK or STYLE element in the document. Imported style sheets are contained within a STYLE element and are available through the imports collection.

Syntax

object.styleSheets(index)

ParameterDescription
object The document object.
(index) Optional. An integer or a string specifying the index value of the style sheet to retrieve. Integer indexes are zero-based, meaning the first style sheet in the collection has index 0.

Example

The following example displays 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);
}

Property

length

Methods

item

Applies To

document


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.