Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

nodeType

Description

The nodeType Node for JS returns a number appropriate for the type of node.

TypeDescriptionNumber
ElementNode.ELEMENT_NODE1
AttrNode.ATTRIBUTE_NODE2
An exclusive Text nodeNode.TEXT_NODE3
CDATASectionNode.CDATA_SECTION_NODE4
ProcessingInstructionNode.PROCESSING_INSTRUCTION_NODE7
CommentNode.COMMENT_NODE8
DocumentNode.DOCUMENT_NODE9
DocumentTypeNode.DOCUMENT_TYPE_NODE10
DocumentFragmentNode.DOCUMENT_FRAGMENT_NODE11

Syntax

node.nodeType

Examples

1 · Element

2 · Attr

3 · Text

4 · CDATASection

5 · ProcessingInstruction

6 · Comment

7 · Document

8 · DocumentType

9 · DocumentFragment

nodeName

baseURI

childNodes

cloneNode

compareDocumentPosition

contains

firstChild

getRootNode

hasChildNodes

isConnected

isEqualNode

lastChild

nextSibling

nodeName

normalize

ownerDocument

parentElement

parentNode

previousSibling

Web Hypertext Application Technology Working Group (WHATWG)

HomeMenu