2.4.7 tags

Quirks Mode, IE7 Mode, IE8 Mode, IE9 Mode, IE10 Mode, and IE11 Mode (All Versions)

Retrieves a collection of objects that have the specified HTML tag name.

The tags method extends the following interfaces:

Parameters

sTag of type DOMString

Specifies an HTML tag. It can be any one of the elements exposed by the DHTML Object Model.

Return Value

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

Successful execution includes the case where no elements having the given name are found. In this case, a collection containing zero elements is returned.

The length property of the collection contains the number of elements in the collection.

Null may be returned in cases where the collection cannot be constructed, such as inability to allocate memory for even a zero-length collection.

No JScript Error