Easy Tutorial
❮ Prop Style Borderimageoutset Prop Style Animationdirection ❯

HTML DOM item() Method

Attributes Object

Example

Return the first attribute name of the button element:

Output result:


Definition and Usage

The item() method returns the node at the specified index in the node list.

Syntax:

Alternative syntax:


Browser Support

All major browsers support the item() method.


Syntax

Parameters

Parameter Type Description
index Number Required. The index of the node in the node list.

Return Value

Type Description
Node Object The node at the specified index.

Technical Details

| DOM Version | Core Level 1 | | --- | --- |


Attributes Object

❮ Prop Style Borderimageoutset Prop Style Animationdirection ❯