2.4.2 item

Note: EdgeHTML Mode does not provide the item method for the HTMLSelectElement interface.

Retrieves an object from various collections, including the all collection.

The item method extends the following interfaces:

All Document Modes (All Versions)

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

  • HTMLSelectElement

All Document Modes (Internet Explorer 8) The iSubindex parameter is not used.

The item method cannot retrieve input type=image elements from a form. To access all elements contained in a form, use the children collection.

Parameters

index of type DOMString

Specifies the object or collection to retrieve. If this parameter is an number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.

iSubindex of type long

Optional. Specifies the zero-based index of the object to retrieve when a collection is returned.

Return Value

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

No JScript Error

Show: