HTML DOM Element hasAttributes()
HTML DOM Element hasAttributes() Method
The hasAttributes() method is used to return true if a node has attributes else false. It is only applicable on the element node and will return false if it is not the element node.
Syntax:-
Its syntax is:- element.hasAttributes() OR node.hasAttributes()
Return:-
Its return is:- true if element has attributes else false