HTML DOM length Property
Return the number of attributes of a button element:
The result could be:
Try it yourself »
Definition and Usage
The length property return the number of nodes in a collection.
A Node object's attributes is an example of a NamedNodeMap object
The length property is supported in all major browsers.
Note: In Internet Explorer 8 and earlier, the length property for attributes will return the number of all possible attributes for an element.
|Return Value:||A Number, representing the number of nodes in the nodemap|
|DOM Version||Core Level 1|
Thank You For Helping Us!
Your message has been sent to W3Schools.