Note : The Rules collection is Internet Explorer 4.0 specific. As Netscape doesn't support dynamic style sheets, it doesn't support the Rules collection.
The Rules collection returns an indexed array of all the style rules in a referenced StyleSheet object. These are the style declarations for elements, classes, ids etc., set in the style sheet. The Rules collection is populated with references to style sheet rules regardless of whether or not the referenced style sheet is disabled, although any scripting changes to the rules will only become visible if the referenced style sheet is enabled. Any style sheets linked via the @import
method will have their rules expanded in-place inside the rules collection.
Note that individual rules can only be added to a rules collection, by using the addRule
method of the StyleSheet object.
length
The length
property returns the number of rules in the collection. Note that the length
count starts at 1, not 0 as the rules collection index does. Therefore, the length
property may return a value of 5, but to access the 3rd rule, you'd need to use object.rules(2).property
© 1995-1998, Stephen Le Hunte
file: /Techref/language/html/ib/Scripting_Reference/rulcol.htm, 2KB, , updated: 2004/3/1 15:47, local time: 2024/12/17 21:03,
3.145.68.94: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://techref.massmind.org/techref/language/html/ib/Scripting_Reference/rulcol.htm"> The Rules collection</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.