Get DD Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:DD


The DD object represents an HTML <dd> element.

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

  <dd id="myDD">for style </dd>
</dl>/*  ww  w. ja v a2 s  .  c  o m*/

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

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

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


Related Tutorials