asp.net.ph

Skip Navigation Links

urns Method

DHTML Methods


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

Syntax

collObjects = object.urns ( "sUrn" ) 
Parameters

sUrn Required. String specifying a 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 JScript™ ( compatible with ECMA-262 language specification ) example retrieves a collection of all P elements in the document and then applies an underline to each.

var coll = document.all.urns ( "/sample/ul.htc" );
if ( coll!=null ) {
  for ( i=0; i<coll.length; i++ )
    alert ( coll.item ( i ).tagName );
}
Applies To

all, areas, elements, forms, SELECT

See Also

behaviorUrns



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note