Get DList Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:DList


The DList object represents an HTML <dl> element.

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<dl id="myDL">
</dl>/*from www  .java 2s.  c  om*/

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

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

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


Related Tutorials