Easy Tutorial
❮ Prop Style Pagebreakbefore Prop Checkbox Type ❯

HTML DOM getNamedItem() Method

Attribute Object

Example

Returns the value of the onclick attribute of the button element:

Output result:


Definition and Usage

The getNamedItem() method returns the value of the specified attribute name in the node list.


Browser Support

All major browsers support the getNamedItem() method.

Note: Internet Explorer 8 and earlier versions do not support this method.


Syntax

Parameters

Parameter Type Description
nodename String Required. The node name you want to return from the node list.

Return Value

Type Description
Node Object The node with the specified name.

Technical Details

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


Attribute Object

❮ Prop Style Pagebreakbefore Prop Checkbox Type ❯