792 Part III . Document (Web hosting domain) Objects Reference deleteRule(index)

792 Part III . Document Objects Reference deleteRule(index) insertRule( rule , index) Returns: Integer (for insertRule()). NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . The insertRule() method appends or inserts a style sheet rule into the current styleSheet object. The first parameter is a string containing the style rule as it would normally appear in a style sheet, including the selector and curly braces sur rounding the semicolon-delimited list of style attribute:valuepairs. You must supply an index location within the cssRulesarray where the new rule is to be inserted. If you want to append the rule to the end of the list, use the length property of the cssRules collection for the parameter. The order of rules in a styleSheet object can influence the cascading order of overlapping style sheet rules (meaning multiple rules that apply to the same elements). The return value is an index for the position of the inserted rule. To remove a rule from a styleSheet object s cssRulescollection, invoke the deleteRule() method. Exercise some care here, because you must have the cor rect index value for the rule that you want to remove. Your script could use a for loop to iterate through the cssRulescollection, looking for a match of the selectorText property (assuming that you have unique selectors). The index for the matching rule can then be used as the parameter to deleteRule(). This method returns no value. For IE4+, the corresponding methods are called addRule()and removeRule(). Example on the CD-ROM Related Items: addRule(), removeRule() methods. cssRule and rule Objects On the CD-ROM Properties Methods Event Handlers cssText parentStyleSheet readOnly selectorText style type ruleObject
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Leave a Reply