最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

removeRule Method

Internet Development Index

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爐hat 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>
P {color:green}
</STYLE>
:
<SCRIPT>
function removeTheRule() {
// Style sheets and rules are zero-based collections; therefore,
// the first item is item 0 in the collection.
var iSheets = document.styleSheets.length;
var iRules = document.styleSheets[iSheets-1].rules.length;
// make sure there is a rule to delete
if (1 < iRules) {
document.styleSheets[iSheets-1].removeRule(1);
// Force the page to render the change.
oEffectRules.innerHTML=oEffectRules.innerHTML;
}
}
</SCRIPT>
:
<P ID=oEffectRules>This text has the new style applied to it.
</P>
:
<BUTTON onclick="removeTheRule()">Remove the new rule.</BUTTON>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this method.

Applies To

styleSheet

See Also

addRule, rules, styleSheets
儋州市| 扎赉特旗| 炉霍县| 三穗县| 静宁县| 上栗县| 平乐县| 阿拉尔市| 邵东县| 林芝县| 习水县| 渝北区| 稷山县| 洛南县| 中江县| 营口市| 喀什市| 广西| 霍林郭勒市| 平顶山市| 建水县| 海原县| 桐梓县| 盘锦市| 罗田县| 徐闻县| 福安市| 潼关县| 揭东县| 富锦市| 天全县| 溧水县| 乐业县| 阳新县| 天柱县| 霍林郭勒市| 都江堰市| 济宁市| 鲁甸县| 绿春县| 临猗县|