ECMAScript binding: setAttribute(name, value) (name and value are Strings; can raise DOMException)
Sets the value of an attribute node on this element with a nodeName matching the given name to the given value. If no such node exists on this element, one is created.
Note: value will not be parsed by the implementation (i.e. it will be treated as literal text and output escaped). More complex values should be created as attribute nodes and added using setAttributeNode.
The exceptions thrown are:
- INVALID_CHARACTER_ERR
- The name given is invalid.
- NO_MODIFICATION_ALLOWED_ERR
- The node is read only.