The Imports collection is Internet Explorer 4.0 specific.
The Imports collection is a collection of all the imported style sheets, defined for the StyleSheet Object. (An imported style sheet is one that has been included in the document using the @import Style Sheet attribute in a <STYLE>
. Note that the imports collection can only be accessed through the StyleSheet Object.
<STYLE TYPE="text/css" ID="CSS1">
@import: url (http://www.mysite.com/Style Sheets/newstyle.css)
@import: url (http://www.mysite.com/Style Sheets/bigred.css)
@import: url (http://www.mysite.com/Style Sheets/bigblue.css)
@import: url (http://www.mysite..com/Style Sheets/crazy.css)
H1 {font-size : 24pt; color : red}
</STYLE>
Referencing:
document.StyleSheets(0).imports(2).href
would return http://www.mysite.com/Style Sheets/bigblue.css
- the location of the third imported stylesheet for the document. (Note the use of the StyleSheets collection to interrogate the imports collection.
length
The length
property returns the number of elements in the collection. Note that the length
count starts at 1, not 0 as the imports collection index does.
item
The item
method retrieves single items, or sub-collections from the all collection. It accepts the following arguments:
all.item(index)
For the imports collection, the index
argument can only be a number, representing the index of the imported stylesheet of interest.
© 1995-1998, Stephen Le Hunte
file: /Techref/language/html/ib/Scripting_Reference/impcol.htm, 2KB, , updated: 2004/3/1 15:47, local time: 2024/11/21 20:21,
3.15.186.78:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/language/html/ib/Scripting_Reference/impcol.htm"> The Imports collection</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.