일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- CSS
- Event
- es6
- js
- nodeValue
- Temporal dead zone
- Dom
- Review
- ES5
- textContent
- node
- keyboardEvent
- a11y
- TypingEffect
- keyup
- innerHTML
- node.js
- javascript
- yet
- beforeinput
- Empty
- for loop
- addEventListener
- css:position
- react
- modal
- HTML
- dotenv
- UI
- innerText
- Today
- Total
the murmurous sea
DOM: HTMLElement.innerText 본문
1. The innerText property of the HTMLElement.
2. represents the "rendered" text content.
: it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied.
3. sets or returns the text content of the specified node, and all its descendants.
4. set the innerText, any child nodes are removed and replaced by a single Text node containing the specified string.
5. As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard.
[Syntax]
Return the text content of a node:
node.innerText
Set the text content of a node:
node.innerText = text
[Return Value]
1. A String, representing the "rendered" text content of a node and all its descendants
2. A DOMString representing the rendered text content of an element. If the element itself is not being rendered (e.g detached from the document or is hidden from view), the returned value is the same as the Node.textContent property.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText
'#dev > 개념정리' 카테고리의 다른 글
Object literal (empty) (0) | 2020.05.12 |
---|---|
DOM: Element.innerHTML (0) | 2020.05.05 |
DOM: Node.textContent (0) | 2020.05.05 |
DOM: Node.nodeValue (0) | 2020.05.05 |
DOM: nodeValue vs. textConent vs. innerText vs. innerHTML (0) | 2020.05.04 |