Name
HTMLElement.getAttribute( ) — get an attribute value
Availability
Internet Explorer 4, Netscape 6
Synopsis
element
.getAttribute(name
)
Arguments
-
name
The name of the attribute.
Returns
The value of the named attribute of
element
or null
if
element
does not have an attribute named
name
.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.