789Chapter 30 .Style Sheet (Anonymous web server) and Style Objects readOnly
Monday, December 31st, 2007789Chapter 30 .Style Sheet and Style Objects readOnly Value: Boolean Read-Only NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . The readOnly property s name is a bit misleading. Its Boolean value lets your script know whether the current style sheetwas embedded in the document by way of the STYLE element or brought in from an external file via the LINK element or @import rule. When embedded by a STYLE element, the readOnly property is false; for style sheets defined outside the page, the property is true. But a value of true doesn t mean that your scripts cannot modify the style properties. Style properties can still be modified on the fly, but of course the changes will not be reflected in the external file from which the initial settings came. Related Items: owningElement property. rules Value: Array of rule Objects Read-Only NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . The rules property returns an array of all rule objects (other than @rules) defined in the current style sheet. The order of rule objects in the array is based on source code order of the rules defined in the STYLE element or in the external file. Use the rules array as the primary way to reference an individual rule inside a style sheet. If you use a forloop to iterate through all rules in search of a particular rule, you will most likely be looking for a match of the rule object s selectorText property. This assumes, of course, that each selector is unique within the style sheet. Using unique selectors is good practice, but no restrictions prevent you from reusing a selector name in a style sheet for additional style information applied to the same selector elements. The corresponding property name for NN6 is cssRules. IE5/Mac responds to both the rulesand cssRules properties. On the CD-ROM Example on the CD-ROM Related Items: rule object; cssRules property. styleSheetObject.rules
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.