Javascript examples for DOM HTML Element:DT
The DT object represents an HTML <dt> element.
You can access a <dt> element by using getElementById():
<!DOCTYPE html> <html> <body> <dl> <dt id="myDT">CSS</dt> <dd>style</dd> </dl>//from www . j a va 2s .com <button onclick="myFunction()">get the HTML content of the dt element</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myDT").innerHTML; document.getElementById("demo").innerHTML = x; } </script> </body> </html>