Node Object
The hasAttributes() method returns true if a node has any attributes, otherwise it returns false.
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and returns whether the first <book> element has any attributes:
Output:
Node Object
Your message has been sent to W3Schools.