Javascript Reference
Categories: Element

javascript Element hasAttribute( )

@July 5, 2008, 1:42 p.m.
hasAttribute( ) Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 1  

hasAttribute("attributeName")

  

Returns a Boolean value true if the current element has an attribute whose name matches the method parameter.

 
Parameters
 
  • The case-sensitive attribute name to search for.
 
Returned Value

Boolean value: true | false.


Powered by Linode.