HTML DOM Element getAttribute()
HTML DOM Element getAttribute() Method
The getAttribute() method is used to return the value of an element attribute.
Syntax:-
Its syntax is:- element.getAttribute(name)
Return:-
Its return is:- attribute value else null
Further Explanation:-
Parameter | Description |
name | Required. The name of the attribute. |