Programmer's Guide > Interfaces > W3C Element interface > hasAttribute method
  
hasAttribute method
Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
hasAttribute(name )
Parameters
Stringname
The name of the attribute to look for.
Returns
trueboolean. if an attribute with the given name is specified on this element or has a default value, false otherwise.