Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Retrieves an attribute specified with the name property using the attributes collection.
Syntax
oGetName = attributes .getNamedItem( sGetName )Parameters
sGetName | Required. String that specifies the name of the attribute to retrieve. |
Return Value
Returns an attribute with the specified name.
Remarks
If the attribute applies to an element but is not specified, this method returns the attribute with the specified name set to an empty string.
If the attribute does not apply to the element and is not specified, then an error is returned.
If the attribute does not apply to the element and is specified, then the attribute with the specified name is returned.
The following example shows how to use the getNamedItem method to retrieve the value of an attribute .
<HTML>
Standards Information
This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
|
attributes |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |