Easy Tutorial
❮ Prop Style Perspectiveorigin Jsref Number Nan ❯

HTML DOM getAttributeNode() Method

Element Object

Example

Return the target attribute of a link:


Definition and Usage

The getAttributeNode() method retrieves an attribute node from the current element by name.

Tip: If you only want to return the attribute value, use the getAttribute method.


Browser Support

All major browsers support the getAttributeNode() method.


Syntax

Parameters

Parameter Type Description
attributename String Required. The name of the attribute you want to return.

Return Value

Type Description
Attr object The specified attribute node.

Technical Details

| DOM Version | Core Level 1 Element Object | | --- | --- |


Element Object

❮ Prop Style Perspectiveorigin Jsref Number Nan ❯