Name
Node.hasAttributes( ): determine whether a node has attributes â DOM Level 2 Core
Synopsis
boolean hasAttributes( );
Returns
true
if this node has one
or more attributes; false
if it
has none. Note that only Element nodes can have attributes.
See Also
Element.getAttribute( )
,
Element.hasAttribute( )
, Node
Get JavaScript: The Definitive Guide, 5th 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.