setAttributeNode
setAttributeNode adds a new attribute node to the current element.
Syntax
replaced_attr = element.setAttributeNode(attribute)Parameters
attribute is a node of type Attribute
replaced_attr is the replaced attribute node, if any, returned by this function
Example
Notes
If the attribute named already exists on the element, then that attribute is replaced with the new one and the replaced one is returned.
Note that this function does not the set the value of the new attribute, only creates it on the element. Use setAttribute to set or change the value on an existing node.
Specification
setAttributeNode
Netscape Communications http://developer.netscape.com |