JavaScript Reference/Javascript Collections/imports
Содержание
"imports" Example
<source lang="javascript">
<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>
Body content.
<script language="JavaScript">
alert(document.styleSheets(0).imports.length);
</script> </body> </html>
</source>
"imports" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |styleSheet | +----------------+--------------------------------------------------------------+
</source>
"imports" JavaScript properties and JavaScript methods
<source lang="javascript">
JavaScript properties and JavaScript methods
item(), length, namedItem()
</source>
"imports" Syntax Parameters and Note
<source lang="javascript">
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 </source>