HTML DOM name attribute
Examples
Returns the name of the property:
document.getElementsByTagName("button")[0].attributes[0].name;
Output:
onclick
try it"
Definition and Usage
name property returns the attribute name.
Browser Support
All major browsers support attribute name
grammar
attribute .name
technical details
return value: | String representing the name of the property. |
---|---|
DOM version | Core Level 1 |