Computer >> 컴퓨터 >  >> 프로그램 작성 >> HTML

HTML DOM 제목 개체

<시간/>

HTML의 HTML DOM 제목 개체는 요소를 나타냅니다.</P> <p> <strong> <title></strong> 만들기 요소</P> <pre>var titleObject = document.createElement(“TITLE”)</pre> <p> 여기에서 "<strong>titleObject"</strong> 다음과 같은 속성을 가질 수 있습니다 -</P> <table><thead><tr valign="TOP"><th>속성 <br> </th> <th>설명 <br> </th> </tr> </thead> <tbody><tr valign="TOP"><td 너비="200">텍스트 <br> </td> <td width="371">문서의 <title> 요소 값을 설정/반환합니다. <br> </td> </tr> </tbody> </table> <p> <strong>제목 텍스트</strong>의 예를 살펴보겠습니다. 속성 -</P> <h2>예시</h2> <pre><!DOCTYPE html> <html> <head> <title id="titleSelect">HTML DOM Title text</title> <style>    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px; } </style> </head> <body>    <form>       <fieldset>          <legend id="legendSelect"></legend>          <input type="button" onclick="getTitleText()" value="What's the title of document?">          <div id="divDisplay"></div>       </fieldset>    </form> <script>    var divDisplay = document.getElementById("divDisplay");    var legendSelect = document.getElementById("legendSelect");    var titleSelect = document.getElementById("titleSelect");    function getTitleText() {       divDisplay.textContent = 'Title of document: '+titleSelect.text;       legendSelect.textContent = titleSelect.text.split(' ').join('-');    } </script> </body> </html></pre> <h2>출력</h2> <p> <strong>'문서 제목이 무엇인가요?'</strong>를 클릭하기 전에 버튼 -</P> <p> <img loading='lazy' alt='HTML DOM 제목 개체 ' src="/article/uploadfiles/202203/2022033116532137.jpg" /></P> <p> <strong>'문서 제목이 무엇인가요?'</strong>를 클릭한 후 버튼 -</P> <p> <img loading='lazy' alt='HTML DOM 제목 개체 ' src="/article/uploadfiles/202203/2022033116532123.jpg" /></P> <br> </article> <div class="ad5"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4480737146802772" crossorigin="anonymous"></script><!-- computer.wsxdn --><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4480737146802772" data-ad-slot="4467655591" data-ad-format="auto" data-full-width-responsive="true"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div id="turn-page" class="text-over"> <a class='LinkPrevArticle' href='https://kr.wsxdn.com/bz024t/hf251z/1002065366.html' >HTML DOM 제목 속성 </a> <a class='LinkNextArticle' href='https://kr.wsxdn.com/bz024t/hf251z/1002065368.html' >HTML DOM 타임스탬프 이벤트 속성 </a> </div> </section> <aside class="box-r box4-r"> <h3>HTML</h3> <ul> <li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064435.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM HTML 개체 ">HTML DOM HTML 개체 </p> </a> </li><li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064541.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM 매개변수 객체 ">HTML DOM 매개변수 객체 </p> </a> </li><li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064542.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM 스크립트 객체 ">HTML DOM 스크립트 객체 </p> </a> </li><li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064643.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM S 객체 ">HTML DOM S 객체 </p> </a> </li><li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064661.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM 요약 개체 ">HTML DOM 요약 개체 </p> </a> </li> </ul> <h3 class="h3-2">컴퓨터</h3> <ul> <li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064733.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM li 개체 ">HTML DOM li 개체 </p> </a> </li> <li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064748.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM 링크 객체 ">HTML DOM 링크 객체 </p> </a> </li> <li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064773.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM 기사 객체 ">HTML DOM 기사 객체 </p> </a> </li> <li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064801.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM 본문 객체 ">HTML DOM 본문 객체 </p> </a> </li> <li> <a href="https://kr.wsxdn.com/bz024t/hf251z/1002064813.html" class="f-start"> <em></em> <p class="r-over r-over-2" title="HTML DOM 코드 객체 ">HTML DOM 코드 객체 </p> </a> </li> </ul> </aside> </section> </div> <ul class="types box4-1 container f-center"> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/ol244g/' target="_self">C 프로그래밍</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/fd245y/' target="_self">C++</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/xv246p/' target="_self">Redis</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/ig247a/' target="_self">BASH 프로그래밍</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/ge248y/' target="_self">Python</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/jh249b/' target="_self">Java</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/yw250q/' target="_self">데이터 베이스</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/hf251z/' target="_self">HTML</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/ig252a/' target="_self">JavaScript</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/qo253i/' target="_self">프로그램 작성</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/vs254n/' target="_self">CSS</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/fd255x/' target="_self">Ruby</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/ay256s/' target="_self">SQL</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/yw257q/' target="_self">IOS</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/wu258o/' target="_self">Android</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/nl259f/' target="_self">MongoDB</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/mk260e/' target="_self">MySQL</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/ax261s/' target="_self">C#</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/bz265t/' target="_self">PHP</a></li> <li><a class='childclass' href='https://kr.wsxdn.com/bz024t/zx271r/' target="_self">SQL Server</a></li> </ul> <footer> <section class="container"> <div class="footer-msg"> <span class="container f-center"> <p class=krf>저작권 © <a href="https://kr.wsxdn.com">https://kr.wsxdn.com</a> 모든 권리 보유</p> </span> </div> </section> </footer> </body> </html>