The nodeValue property of the Node interface returns or sets the value of the current node.
Use the textContent property to return the concatenation of the textContent of every child node. You can use it to set a text for a node.
The value of an input element is available from its value property. nodeValue is a property of all DOM nodes, and not relevant to input elements.
Definition and UsageThe nodeValue property sets or returns the value of a node. If the node is an element node, the nodeValue property will return null. Note: If you want to return the text of an element, remember that text is always inside a Text node, and you will have to return the Text node's node value (element.
When I set a value of a text node with
node.nodeValue="string with &#xxxx; sort of characters"
ampersand gets escaped. Is there an easy way to do this?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With