XML DOM createAttribute() method
Definition and usage
Create a new Attr node.
Syntax:
createAttribute(name)
Parameter | Description |
---|---|
name | the name of the newly created attribute. |
throw
If the name parameter contains illegal characters, this method will throw a code of INVALID_CHARACTER_ERR DOMException exception.