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

behavior Attribute | behavior Property

Internet Development Index

Sets or retrieves the location of the Introduction to DHTML Behaviors.

Syntax

HTML { behavior : sBehavior }
Scriptingobject.style.behavior [ = sBehavior ]

Possible Values

sBehaviorString that specifies or receives one of the following values.
url(sLocation)Script implementation of a Dynamic HTML (DHTML) behavior, where sLocation is an absolute or relative URL.
url(#objID)Binary implementation of a DHTML behavior, where objID is the ID attribute specified in an object tag.
url(#default#behaviorName)Microsoft® Internet Explorer?A HREF="../reference.html">default behavior, identified by its behaviorName.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has no default value. The Cascading Style Sheets (CSS) attribute is not inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

You can apply multiple behaviors to an element by specifying a space-delimited list of URLs for the behavior attribute, as shown in the following syntax:

<ELEMENT STYLE="behavior:url(a1.htc) url(a2.htc) ..." >

In the following section, one example demonstrates how you can apply two behaviors to an element to achieve a combination of effects. Conflicts resulting from applying multiple behaviors to an element are resolved based on the order in which the behavior is applied to the element. Each succeeding behavior takes precedence over the previous behavior. For example, if multiple behaviors set the element's color, the prevailing color is the one set by the behavior last applied to the element. The same rule applies in resolving name conflicts, such as with property, method, or event names exposed by multiple behaviors.

Once the behavior property is defined for the element, the addBehavior method can be used to dynamically attach additional behaviors to the element.

Note  A behavior attached to an element by using the addBehavior method or by applying the proposed Cascading Style Sheets (CSS)?B>behavior attribute inline is not automatically detached from the element when the element is removed from the document hierarchy. However, a behavior attached using a style rule defined in the document is detached automatically as the element is removed from the document tree.

Examples

The following examples demonstrate various ways of applying the behavior property on a page.

This example implements an expanding and collapsing table of contents by applying the behavior as an inline style to the li element. In this case, two behaviors implemented as HTML Component (HTC) have been applied to the element to achieve a combination of mouseover highlighting and expanding/collapsing effect.

<UL>
<LI STYLE="behavior:url(ul.htc) url(hilite.htc)">HTML</LI>
<UL>
<LI><tla rid="tla_ie4"/> authoring tips</LI>
:
</UL>
</UL>

This example defines the behavior attribute in a separate style block.

<style>
.CollapsingAndHiliting {behavior:url(ul.htc) url(hilite.htc)}
</style>
<UL>
<LI CLASS="CollapsingAndHiliting">HTML</LI>
<UL>
<LI><tla rid="tla_ie4"/> authoring tips</LI>
:
</UL>
</UL>

This example sets the behavior property in script.

<SCRIPT>
function window.onload()
{
idTopic1.style.behavior = "url(ul.htc) url(hilite.htc)";
}
</SCRIPT>
:
<UL>
<LI ID=idTopic1>HTML Authoring</LI>
<UL>
<LI><tla rid="tla_ie4"/> authoring tips</LI>
:
</UL>
</UL>
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.

If the expanding/collapsing example were to use a DHTML behavior implemented in C++ as an Microsoft ActiveX® control, the code would look slightly different. In this example, the behavior attribute points to the id property of the object specified in the object element.

<STYLE>
.Collapsing { behavior:url(#myObject) }
</STYLE>
<OBJECT ID=myObject ... ></OBJECT>
<UL>
<LI CLASS="Collapsing">HTML Authoring</LI>
<UL>
<LI><tla rid="tla_ie4"/> authoring tips</LI>
:
</UL>
</UL>

Standards Information

This property is part of a proposed addition to CSS Non-Microsoft link.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, currentStyle, CUSTOM, DD, defaults, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, hn, HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, nextID, NOBR, NOFRAMES, NOSCRIPT, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, WBR, XML, XMP

See Also

Using DHTML Behaviors
毕节市| 桦甸市| 青田县| 肇州县| 嘉鱼县| 嵊州市| 诏安县| 宁津县| 济南市| 略阳县| 凤翔县| 塔城市| 巴中市| 东安县| 永济市| 克东县| 仙游县| 星子县| 长沙县| 改则县| 元氏县| 延安市| 乐清市| 衡山县| 收藏| 缙云县| 且末县| 达州市| 盐城市| 绥芬河市| 同德县| 普定县| 锦州市| 大城县| 双峰县| 南汇区| 浮山县| 雷波县| 江源县| 富锦市| 溧水县|