behaviorUrns collection
Represents a collection of the Uniform Resource Names for all behaviors attached to an element.
Perhaps for security reasons, the elements of the behaviorUrns collection are always empty strings.
The only information provided by the behaviorUrns collection is the number of attached behaviors (length property).
Syntax:
Properties that reference the object:
| object.behaviorUrns |
Related objects:
Related HTML objects:
a, abbr, acronym, address, applet, area, b, base, basefont, bdo, bgsound, big, blockquote, body, br, button, caption, center, cite, code, col, colgroup, comment, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, frame, frameset, h1, h2, h3, h4, h5, h6, head, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:hidden, input:image, input:password, input:radio, input:reset, input:submit, input:text, ins, isindex, kbd, label, legend, li, link, listing, map, marquee, menu, meta, nobr, noframes, noscript, object, ol, optgroup, option, p, param, 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
|
Possible members:
Properties:
Returns an integer that specifies the number of behaviors in the current collection.
This property is read-only. |
Methods:
[index] |
Returns a Uniform Resource Name from the current collection by index.
Parameters:
Return value:
Returns a string that contains the Uniform Resource Name. Perhaps for security reasons, always returns an empty string.
|
||||||||||||||
item (index) |
Returns a Uniform Resource Name from the current collection by index.
Parameters:
Return value:
Returns a string that contains the Uniform Resource Name. Perhaps for security reasons, always returns an empty string.
|
Example HTML code 1:
This example illustrates the use of the behaviorUrns collection:
|
|||||
<head> <style> #myDiv { behavior: url(hover.htc); } </style> <script type="text/javascript"> function GetURNs () { var div = document.getElementById ("myDiv"); if ('behaviorUrns' in div) { alert ("The number of attached behaviors is " + div.behaviorUrns.length); } else { alert ("Your browser doesn't support the behaviorUrns property!"); } } </script> </head> <body> <div id="myDiv">Sample division</div> <br /> <button onclick="GetURNs ();">Get the behaviors attached to the 'Sample division' element!</button> </body> |
|||||
|
|||||
Did you find this example helpful?
|
External links:
User Contributed Comments