createElement(tagName )
|
|
Parameters
|
StringtagName
The name of the element type to instantiate. For XML, this is case-sensitive. For HTML, the tagName parameter may be provided in any case, but it must be mapped to the canonical uppercase form by the DOM implementation.
|
Returns
|
Element. A new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to null.
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
|