JavaScript Reference/Javascript Methods/getNamedItem
"getNamedItem()" Example
<source lang="javascript">
<html> <body> <button onclick="alert(this.attributes.getNamedItem("onclick").value);"> Get named item</button> </body> </html>
</source>
"getNamedItem()" is applied to
<source lang="javascript">
Names noted with an asterisk (*) are JavaScript properties only. +----------------+--------------------------------------------------------------+ | Applied_To |attributes* | +----------------+--------------------------------------------------------------+
</source>
"getNamedItem()" Syntax, Parameters and Note
<source lang="javascript">
Note: Returns the specified attribute value.
Syntax:
document.all.elementID.attributes.getNamedItem(param1) Parameters:
param1 Required; the name of the attribute. </source>