Javascript examples for DOM HTML Element:DD
The DD object represents an HTML <dd> element.
You can access a <dd> element by using getElementById():
<!DOCTYPE html> <html> <body> <dl> <dt>CSS</dt> <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> <script> function myFunction() { var x = document.getElementById("myDD").innerHTML; document.getElementById("demo").innerHTML = x; } </script> </body> </html>