Get the name of an attribute:
The result of x will be:
The name property returns the name of the attribute.
This property is read-only.
Tip: You can use the attr.value property to get the value of an attribute.
Property | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
Return Value: | A String, representing the name of the attribute |
---|---|
DOM Version | Core Level 1 |