JavaScript Reference/Javascript Methods/addImport

Материал из Web эксперт
Перейти к: навигация, поиск

"addImport()" Example

<script language="JavaScript">
    document.styleSheets[0].addImport("yourstylesheet.css", 2);
<body>Body content</body>

"addImport()" is applied to

| Applied_To     |styleSheet                                                    |

"addImport()" Syntax, Parameters and Note

Adds a style sheet to the imported styleSheets
Returns the index of the style sheet.
document.styleSheets[index].addImport(param1, param2)

    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.