diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:48:24 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:48:24 +0100 |
commit | ee778d6eea54935fd05022e0ba8c49456003381a (patch) | |
tree | 151a4cef804d8823cc8fc753b8edc693b7078241 /files/ko/web/api/node | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-ee778d6eea54935fd05022e0ba8c49456003381a.tar.gz translated-content-ee778d6eea54935fd05022e0ba8c49456003381a.tar.bz2 translated-content-ee778d6eea54935fd05022e0ba8c49456003381a.zip |
unslug ko: move
Diffstat (limited to 'files/ko/web/api/node')
-rw-r--r-- | files/ko/web/api/node/innertext/index.html | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/files/ko/web/api/node/innertext/index.html b/files/ko/web/api/node/innertext/index.html deleted file mode 100644 index 414fab5c00..0000000000 --- a/files/ko/web/api/node/innertext/index.html +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Node.innerText -slug: Web/API/Node/innerText -tags: - - API - - DOM - - HTMLElement - - Property - - Reference -translation_of: Web/API/HTMLElement/innerText ---- -<div>{{APIRef("HTML DOM")}}</div> - -<p><span class="seoSummary">{{domxref("HTMLElement")}} 인터페이스의 <code><strong>innerText</strong></code> 속성은 요소와 그 자손의 렌더링 된 텍스트 콘텐츠를 나타냅니다.</span> <code>innerText</code>는 사용자가 커서를 이용해 요소의 콘텐츠를 선택하고 클립보드에 복사했을 때 얻을 수 있는 텍스트의 근삿값을 제공합니다.</p> - -<div class="blockIndicator note"> -<p><strong>참고:</strong> <code>innerText</code>는 {{domxref("Node.textContent")}}와 혼동하기 쉬우나 중요한 차이점을 가지고 있습니다. 기본적으로, <code>innerText</code>는 텍스트의 렌더링 후 모습을 인식할 수 있지만 <code>textContent</code>는 그렇지 않습니다.</p> -</div> - -<h2 id="구문">구문</h2> - -<pre>const renderedText = <em>htmlElement</em>.innerText -<em>htmlElement</em>.innerText = <em>string</em> -</pre> - -<h3 id="값">값</h3> - -<p>요소의 렌더링 된 텍스트 콘텐츠를 나타내는 {{domxref("DOMString")}}. 요소 자체가 <a href="https://html.spec.whatwg.org/multipage/rendering.html#being-rendered">렌더링 중</a>이 아니라면 {{domxref("Node.textContent")}} 속성의 값과 동일합니다.</p> - -<h2 id="예제">예제</h2> - -<p>다음 예제는 <code>innerText</code>와 {{domxref("Node.textContent")}}를 비교합니다. <code>innerText</code>가 {{htmlElement("br")}} 태그를 인식하고, 숨겨진 요소를 무시하는 점에 주목하세요.</p> - -<h3 id="HTML">HTML</h3> - -<pre class="brush: html"><h3>원본 요소:</h3> -<p id="source"> - <style>#source { color: red; }</style> -아래에서<br>이 글을<br>어떻게 인식하는지 살펴보세요. - <span style="display:none">숨겨진 글</span> -</p> -<h3>textContent 결과:</h3> -<textarea id="textContentOutput" rows="6" cols="30" readonly>...</textarea> -<h3>innerText 결과:</h3> -<textarea id="innerTextOutput" rows="6" cols="30" readonly>...</textarea></pre> - -<h3 id="JavaScript">JavaScript</h3> - -<pre class="brush: js">const source = document.getElementById('source'); -const textContentOutput = document.getElementById('textContentOutput'); -const innerTextOutput = document.getElementById('innerTextOutput'); - -textContentOutput.innerHTML = source.textContent; -innerTextOutput.innerHTML = source.innerText;</pre> - -<h3 id="결과">결과</h3> - -<p>{{EmbedLiveSample("예제", 700, 450)}}</p> - -<h2 id="명세">명세</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG', 'dom.html#the-innertext-idl-attribute', 'innerText')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td>Introduced, based on the <a href="https://github.com/rocallahan/innerText-spec">draft of the innerText specification</a>. See <a href="https://github.com/whatwg/html/issues/465">whatwg/html#465</a> and <a href="https://github.com/whatwg/compat/issues/5">whatwg/compat#5</a> for history.</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_Compatibility" name="Browser_Compatibility">브라우저 호환성</h2> - - - -<p>{{Compat("api.HTMLElement.innerText")}}</p> - -<h2 id="같이_보기">같이 보기</h2> - -<ul> - <li>{{domxref("HTMLElement.outerText")}}</li> - <li>{{domxref("Element.innerHTML")}}</li> -</ul> |