Attribute.nodeValue (Property)

Another name for the value property of this object.


DOM level - 1
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myAttribute.nodeValue

The value portion of the ATTRIBUTE="aValue" construct. Knowing the name and value of an attribute provides sufficient information to reconstruct the source HTML code from scratch. Some nodeValues may not be defined by ATTRIBUTE HTML tag attributes, but may be the content of the tag itself.

If the object that the attributes are associated with is a TxtNode object, then the nodeValue should return the textual content encapsulated by that object. In that case, the nodeValue cannot be modified although it may be writable for other object types.

If the nodeType is an attribute then the nodeValue reflects its HTML tag attribute value or null if it has not been defined.

If the nodeType is an HTML Element object, then the nodeName should be used to determine which tag it encapsulates. In that case the nodeValue should yield a null.