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

addRule Method

Internet Development Index

Creates a new rule for a style sheet.

Syntax

plNewIndex = styleSheet.addRule(sSelector, sStyle [, iIndex])

Parameters

sSelector Required. String爐hat specifies the selector for the new rule. Single contextual selectors are valid. For example, "div?A HREF="../objects/p.html">p?A HREF="../objects/b.html">b" is a valid contextual selector.
sStyle Required. String爐hat specifies the style assignments for this style rule. This style takes the same form as an inline style specification. For example, "color:blue" is a valid style parameter.
iIndex Optional. Integer爐hat specifies the zero-based position in the rules collection where the new style rule should be placed.
-1Default. The rule is added to the end of the collection.

Return Value

Reserved. Always returns -1.

Remarks

You can apply rules to a disabled styleSheet, but they do not apply to the document until you enable the styleSheet.

Example

This example uses the addRule method to add a rule that sets all bold text appearing in a DIV to the color blue.

<STYLE>
</STYLE>
<DIV>
Internet Explorer makes <B>HTML</B> dynamic.
</DIV>
<SCRIPT>
var new_rule;
new_rule = document.styleSheets[0].addRule("DIV B", "color:blue", 0);
</SCRIPT>

Standards Information

There is no public standard that applies to this method.

Applies To

styleSheet

See Also

removeRule, rules, styleSheets
龙胜| 镇康县| 延安市| 固始县| 阿拉善右旗| 灵山县| 武隆县| 石首市| 仪征市| 昔阳县| 皋兰县| 习水县| 镇平县| 遂昌县| 刚察县| 无极县| 云浮市| 左云县| 锦州市| 大宁县| 丹棱县| 介休市| 日照市| 揭东县| 松阳县| 德令哈市| 米林县| 湘乡市| 安新县| 宁河县| 府谷县| 永城市| 墨竹工卡县| 错那县| 乌兰察布市| 杂多县| 台山市| 文水县| 兰溪市| 上犹县| 义马市|