JavaScript Reference/Javascript Collections/imports — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
Содержание
"imports" Example
<html>
<head>
<style type="text/css" id="myStyle">
@import "external.css";
@import "examples.css";
@import "heading.css";
@import "page.css";
@import "site.css";
@import "application.css";
</style></head>
<body>
<p>Body content.</p>
<script language="JavaScript">
alert(document.styleSheets(0).imports.length);
</script>
</body>
</html>
"imports" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |styleSheet |
+----------------+--------------------------------------------------------------+
"imports" JavaScript properties and JavaScript methods
JavaScript properties and JavaScript methods
item(), length, namedItem()
"imports" Syntax Parameters and Note
Note:
Returns an array of all style sheets that have been linked to the page using
the @import rule.
Syntax:
document.styleSheets(index).imports // returns all style sheets
document.styleSheets(index).imports(param1) // returns an individual style sheet
param1 Required; the zero-based index