document.styleSheets

概要

明示的にリンクされたスタイルシートと文書に埋め込まれたスタイルシートで構成される、StyleSheet オブジェクトのリストを返します。

構文

styleSheetList = document.styleSheets;

戻り値は StyleSheetList オブジェクトとなります。これは、StyleSheet オブジェクトの順序付きコレクションです。このインデックス (index は 0 から始まる) によって、styleSheetList.item(index) か単純に styleSheetList[index] で、 1 つの StyleSheet オブジェクトが返ります。

プロパティ

length
オブジェクトに含まれる StyleSheet オブジェクトの個数
styleSheetsNum = document.styleSheets.length;

仕様

Document Tags and Contributors

Contributors to this page: ethertank, Taken, Marsf
最終更新者: ethertank,