Element Methods: getAttribute()

By: Dusty Arlia
Published on Sunday, April 13, 2014, 08:23 PM
Last Updated on Friday, July 10, 2015 at 12:11 AM
Total Updates: 2

The getAttribute() method of the Element JavaScript object is used to query NONSTANDARD HTML attribute values. This method will return null if no attribute with the specified name exists.

The standard HTML attributes are mirrored on the HTMLElement object as properties.