HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The following code fragment loads "books.xml" into xmlDoc and returns whether the first <book> element has any attributes
The hasAttributes() method returns true if the specified node has any attributes, otherwise false.
The hasAttributes() method is supported in all major browsers.
nodeObject.hasAttributes()
None.
Type | Description |
---|---|
Boolean | Returns true if the specified node has any attributes, otherwise false |
DOM Version | Core Level 2 Node Object |
---|
❮ Node Object