Programmer's Guide > Interfaces > W3C Element interface > getAttribute method
  
getAttribute method
Retrieves an attribute value by name.
getAttribute(name )
Parameters
Stringname
The name of the attribute to retrieve.
Returns
String. The Attr value as a string, or the empty string if that attribute does not have a specified or default value.