(Translated by https://www.hiragana.jp/)
urns Method (all, anchors, applets, ...)
The Wayback Machine - https://web.archive.org/web/20080404213438/http://msdn2.microsoft.com:80/en-us/library/ms536780(VS.85).aspx
Click to Rate and Give Feedback
Methods
 urns Method
urns Method

Retrieves a collection of all objects to which a specified behavior is attached.

Syntax

collObjects = object.urns(sUrn)

Parameters

sUrn Required. String that specifies the behavior's Uniform Resource Name (URN).

Return Value

Returns a collection of objects if successful, or null otherwise.

Remarks

This method returns an empty collection if no element has the specified behavior attached to it.

Use the length property on the collection to determine the number of elements it contains, and the item method to obtain a particular item in the collection.

Example

The following example shows how to use the urns method to retrieve a collection of all elements currently attached to the specified behavior and then display a comma-delimited list of these element IDs in a message box.

<SCRIPT LANGUAGE="JScript">
var coll  = document.all.urns("URN1");
var sText = '';

if (coll != null)
{
    for (i=0; i<coll.length; i++) 
	   sText += coll.item(i).id + ', ';

    window.alert (sText);
}
</SCRIPT>

Standards Information

There is no public standard that applies to this method.

Applies To

all, anchors, applets, areas, boundElements, cells, childNodes, children, elements, embeds, FORM, forms, images, links, options, rows, scripts, SELECT, styleSheets, tBodies

See Also

behaviorUrns
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker