Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- HTML
- Temporal dead zone
- ES5
- innerText
- keyup
- js
- Dom
- a11y
- for loop
- UI
- innerHTML
- es6
- dotenv
- Review
- modal
- addEventListener
- node
- textContent
- javascript
- nodeValue
- CSS
- css:position
- yet
- beforeinput
- keyboardEvent
- TypingEffect
- node.js
- Event
- Empty
- react
Archives
- Today
- Total
the murmurous sea
DOM: Node.nodeValue 본문
1. property of the Node interface.
2. returns or sets the value of the current node.
3. If the node is an element node, the nodeValue property will return null.
: 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.childNodes[0].nodeValue).
4. An alternative to the nodeValue property can be the textContent property.
[Syntax]
Return the node value:
node.nodeValue
Set the node value:
node.nodeValue = value
[Return Value]
: A String, representing the value of the node.
: Possible values
Returns |
null | for element nodes and document nodes |
the value of the attribute | for attribute nodes | |
the content | for text nodes | |
for comment nodes |
https://www.w3schools.com/jsref/prop_node_nodevalue.asp
https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue
'#dev > 개념정리' 카테고리의 다른 글
DOM: HTMLElement.innerText (0) | 2020.05.05 |
---|---|
DOM: Node.textContent (0) | 2020.05.05 |
DOM: nodeValue vs. textConent vs. innerText vs. innerHTML (0) | 2020.05.04 |
JS ES1: slice() (0) | 2020.05.04 |
JS, ES1: splice() (0) | 2020.05.04 |
Comments