JavaScript Reference/Javascript Methods/addImport
Версия от 21:30, 25 мая 2010; (обсуждение)
"addImport()" Example
<source lang="javascript">
<html> <head> <script language="JavaScript">
document.styleSheets[0].addImport("yourstylesheet.css", 2);
</script> </head> <body>Body content</body> </html>
</source>
"addImport()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |styleSheet | +----------------+--------------------------------------------------------------+
</source>
"addImport()" Syntax, Parameters and Note
<source lang="javascript">
Note: Adds a style sheet to the imported styleSheets Returns the index of the style sheet.
Syntax:
document.styleSheets[index].addImport(param1, param2)
Parameters:
param1 Required; the location of the style sheet file. param2 Optional; the index of the style sheet. If an index is not specified, the style sheet is added to the end. </source>