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