The nodeType PropertyThe nodeType property returns a numeric value indicating the type of a node. You can see the support for this property in Table 5.37. Table 5.37. The nodeType Property
You can see the possible node type values in Table 5.38; here, I'm including all possible values for both XML and HTML documents, because you can mix HTML and XML documents in the Internet Explorer (more on this in Chapter 22, "XML and XSLT"). The only valid node types for HTML nodes are 1, 2, 3, 8, 9, 10, and 11. Table 5.38. W3C Node Types
For an example using this property, see the nodeName topic earlier in this chapter. |