The nodeValue PropertyThe nodeValue property returns a node's valuebut note that this has meaning only for text nodes (where the node's value is the text itself) and attribute nodes (where the node's value is the value assigned to the attribute). For other nodes, such as element nodes, this property is null (which evaluates to false in Boolean conditions such as those you use in if statements). You can see the support for this property in Table 5.39. Table 5.39. The nodeValue Property
Tip Technically, this property should always return a string, and it is a string in the Netscape Navigator; however, the Windows version of Internet Explorer (not the Mac version) returns a number if the attribute value is a number. For an example using this property, see the nodeName topic earlier in this chapter. |