Posted By

wizard04 on 08/17/08


Tagged

javascript node type DOM nodetype


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

jamesming
kcmr
jschilling


DOM node types


 / Published in: JavaScript
 

  1. //nodeType "constants"
  2. if(!document.ELEMENT_NODE)
  3. {
  4. document.ELEMENT_NODE = 1;
  5. document.ATTRIBUTE_NODE = 2;
  6. document.TEXT_NODE = 3;
  7. document.CDATA_NODE = 4;
  8. document.ENTITY_REFERENCE_NODE = 5;
  9. document.ENTITY_NODE = 6;
  10. document.PROCESSING_INSTRUCTION_NODE = 7;
  11. document.COMMENT_NODE = 8;
  12. document.DOCUMENT_NODE = 9;
  13. document.DOCUMENT_TYPE_NODE = 10;
  14. document.DOCUMENT_FRAGMENT_NODE = 11;
  15. document.NOTATION_NODE = 12;
  16. }

Report this snippet  

You need to login to post a comment.