#dev/개념정리
DOM: Node.textContent
lunacer
2020. 5. 5. 11:03
1. property of the Node interface.
2. sets or returns the text content of the specified node, and all its descendants.
3. set the textContent property
: any child nodes are removed and replaced by a single Text node containing the specified string.
[Syntax]
Return the text content of a node:
node.textContent
Set the text content of a node:
node.textContent = htmlString
[Return Value]
: A String, representing the text of the node and all its descendants.
: or Returns null if the element is a document, a document type, or a notation.
https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent