Attribute.nodeType (Property)

Part of the internal document hierarchy management within MSIE.

Availability:

DOM level - 1
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:Number primitive
JavaScript syntax:-myAttribute.nodeType

The node hierarchy is built from objects that represent a variety of different kinds of Document Object Model content.

The two principle node types are HTML Element nodes (value 1) and Text content nodes (value 3).

Here is a list of the available node types:

Constant:Type:Description:
undefinednullA member of the attributes collection
ELEMENT_NODE1HTML element object node
ATTRIBUTE_NODE2HTML tag attribute object
TEXT_NODE3Text object node
CDATA_SECTION_NODE4CDATA section
ENTITY_REFERENCE_NODE5Entity reference
ENTITY_NODE6Entity node
PROCESSING_INSTRUCTION_NODE7Processing instruction node
COMMENT_NODE8Comment node
DOCUMENT_NODE9Document object
DOCUMENT_TYPE_NODE10Doctype object
DOCUMENT_FRAGMENT_NODE11Document fragment node
NOTATION_NODE12Notation node

See also:Node object