最新国产好看的视频,伊人天堂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
平远县| 通山县| 承德县| 绥江县| 阿合奇县| 麻栗坡县| 子长县| 拉萨市| 松滋市| 涟源市| 余庆县| 柯坪县| 桐柏县| 滨州市| 浦江县| 安阳市| 灵台县| 乌鲁木齐市| 达日县| 平原县| 民勤县| 青岛市| 友谊县| 崇文区| 卢龙县| 宁国市| 洪湖市| 浦北县| 金湖县| 石渠县| 桦甸市| 安陆市| 陆川县| 堆龙德庆县| 铜山县| 兴山县| 昌宁县| 驻马店市| 梅州市| 高陵县| 南丹县|