Home | Top | Web development | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Deletes an existing style rule for the styleSheet object, and adjusts the index of the rules collection accordingly.
Syntax
styleSheet.removeRule( [ iIndex ] )Parameters
iIndex | Optional. Integer that specifies the index value of the rule to be deleted from the style sheet. If an index is not provided, the first rule in the rules collection is removed. |
Return Value
No return value.
Remarks
The page does not automatically reflow when the rule is removed. To see the change, you must reflow the page. You can reflow the objects affected using a number of methods. For example, you can reflow the style change only on affected text by setting the text equal to itself. Alternately, you can reload the entire page using the reload method. When you use the refresh method on a table, its content is reflowed.
Example
This example uses the removeRule method to delete a rule from the rules collection, which causes the text to reflow according to the new rules.
<STYLE>
Standards Information
There is no public standard that applies to this method.
Applies To
|
styleSheet |
Home | Top | Web development | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |