JavaScript: The Definitive Guide

25.64. Document.createElement( ): create a new Element node

DOM Level 1 Core:

25.64.1. Synopsis

Element createElement(String tagName) tHRows DOMException;

25.64.1.1. Arguments

tagName

The tag name of the Element to be created. Since HTML tags are case-insensitive, you may use any capitalization for HTML tag names. XML tag names are case-sensitive.

25.64.1.2. Returns

A newly created Element node with the specified tag name.

25.64.1.3. Throws

This method throws a DOMException with a code of INVALID_CHARACTER_ERR if tagName contains an illegal character.

Категории