HBCMS更多的中文手册参考:

behaviorUrns Collection

DHTML文档教程

Returns a collection of Uniform Resource Name (URN) strings identifying the behaviors attached to the element.

dhtml语法

[ oColl = ] object.behaviorUrns
[ oObject = ] object.behaviorUrns(iIndex)

DHTML可能的值

oCollArray of URNs identifying the behaviors attached to the element.
oObjectReference to an individual item in the array of elements contained by the object.
iIndexRequired. Integer that specifies the zero-based index of the item to be returned.

Members Table

PropertyDescription
length Sets or retrieves the number of objects in a collection.
MethodDescription
item Retrieves an object from the behaviorUrns collection.

Remarks

A behavior can specify a unique identifier in the form of a URN. If no URN is specified for a behavior, an empty string is specified in the collection. If no behaviors are attached to the element, an empty collection is returned.

DHTML代码范例

This example demonstrates how to determine the behaviors attached to a div.

<HEAD>
<STYLE>
DIV { behavior:url(fly.htc) url (zoom.htc) url (fade.htc)}
</STYLE>
function window.onload()
{
oColl = oDiv.behaviorUrns;
if (oColl != null)
{
for (i=0; i < oColl.length; i++)
alert (oColl(i));
}
}
</HEAD>
<DIV ID=oDiv>I just want to fly</DIV>

是否符合公共标准

There is no public standard that applies to this collection.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, CUSTOM, DD, 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, 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

更多语法参考

urns