Get the value of the onclick attribute of a button element:
The result of btn could be:
The getNamedItem() method returns the attribute node with the specified name from a NamedNodeMap object.
The numbers in the table specify the first browser version that fully supports the method.
Method | |||||
---|---|---|---|---|---|
getNamedItem() | Yes | 9.0 | Yes | Yes | Yes |
Parameter | Type | Description |
---|---|---|
nodename | String | Required. The name of the node in the namedNodeMap you want to return |
Return Value: | A Node object, representing the attribute node with the specified name |
---|---|
DOM Version | Core Level 1 |