A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/ko/docs/Web/API/Document/createTextNode below:

Document.createTextNode() - Web API | MDN

Document.createTextNode()

Baseline Widely available

요약

텍스트 노드를 생성합니다.

문법
텍스트 = document.createTextNode(데이터);
매개변수 예제
<html>
  <head>
    <title>createTextNode 예제</title>

    <script type="text/javascript">
      function addTextNode() {
        var newtext = document.createTextNode(" 동적으로 추가되는 텍스트. ");
        var para = document.getElementById("p1");
        para.appendChild(newtext);
      }
    </script>
  </head>

  <body>
    <div style="border: 1px solid red">
      <p id="p1">단락의 첫번째 줄.<br /></p>
    </div>
    <br />

    <button onclick="addTextNode();">TextNode 추가하기.</button>
  </body>
</html>
규약

createTextNode


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4