Javascript Reference
Categories: Node

javascript Node ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE

@April 4, 2009, 2:46 a.m.

ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE,
DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE,
DOCUMENT_TYPE_NODE, ELEMENT_NODE,
ENTITY_NODE, ENTITY_REFERENCE_NODE,
NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 1  

 

Read-only  

This set of constants belongs to the root Node object of the W3C DOM, and is therefore inherited by all document-level nodes and elements. Each property corresponds to an integer value associated with the nodeType property of every DOM node. You can use these properties as a more plain-language way to indicate the node type your script is looking for in comparisons or similar operations.

 
Example
 
if (myObject.nodeType == document.ELEMENT_NODE) {
		  // process as an element here
		}
 
Value

Integer corresponding to DOM node type as follows.

 
Property nodeType Value
ELEMENT_NODE 1
ATTRIBUTE_NODE 2
TEXT_NODE 3
CDATA_SECTION_NODE 4
ENTITY_REFERENCE_NODE 5
ENTITY_NODE 6
PROCESSING_INSTRUCTION_NODE 7
COMMENT_NODE 8
DOCUMENT_NODE 9
DOCUMENT_TYPE_NODE 10
DOCUMENT_FRAGMENT_NODE 11
NOTATION_NODE 12
 
Default

Constant values (above).

As I web site possessor I believe the content material here is rattling great , appreciate it for your hard work. You should keep it up forever! Good Luck.
FukuiSi - 1 weeks
Under moderation.
xmmkocpqs - 2 weeks
Under moderation.
kcmslzqyk - 3 weeks

Powered by Linode.