Get DT Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:DT


The DT object represents an HTML <dt> element.

You can access a <dt> element by using getElementById():

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

  <dt id="myDT">CSS</dt>
</dl>//from   www .  j  a  va 2s  .com

<button onclick="myFunction()">get the HTML content of the dt element</button>

<p id="demo"></p>

function myFunction() {
    var x = document.getElementById("myDT").innerHTML;
    document.getElementById("demo").innerHTML = x;


Related Tutorials