ZVON > References > DOM2 Reference

createElement (method )

Owning interface and usage:  
Document.createElement(tagName)

Member of these other interfaces:  
none

Description:  
Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object.

Parameters:  
DOMString tagName  -  The name of the element type to instantiate. (Remember that for XML this is case-sensitive.)

Returns:  
Element -  A new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to null.

Exceptions:  
DOMException INVALID_CHARACTER_ERR
Raised if the specified name contains an illegal character.

Note:  
If there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element.


Example:
JavaScript:
  var elem = document.createElement('P');
  var output = elem.nodeName;
Output:
desired your browser
P



_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
answering service water softener MSN Alojamiento Web UNLIMITED Web Hosting by HostDepartment
VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE