javascript attributes setNamedItem( )
setNamedItem( ) | Firefox/Netscape/NN 6 IE 6 Chrome/Safari/DOM 1 |
setNamedItem(attrObjectReference) |
|
Inserts a single Attr object into the current collection of attributes. If the destination of the attribute is an existing element, you may also use the setAttributeNode( ) method on the element to insert the Attr object. When the setNamedItem( ) method is invoked, the browser first looks for a match between the new attribute's name and existing attribute names within the collection. If there is a match, the new attribute replaces the original one; otherwise, the new attribute is added to the collection. |
|
Parameters | |
|
|
Returned Value | |
Reference to an Attr object either created anew or referenced from elsewhere in the document tree. |
Powered by Linode.