HTML DOM nodeValue Property
HTML DOM nodeValue Property
The nodeValue property is used to either set or return the value of a node. For element node, it will return NULL. For getting text inside an element which is basically a text node you have to write element.childNodes[0].nodeValue.
Syntax:-
Its syntax is:- node.nodeValue OR node.nodeValue = value
Return:-
Its return is:- node value else null for element and document nodes
Further Explanation:-
Pryperty | Description |
value | The node value. |