<html>
<body>
<ul id="myList">
<li>Coffee</li>
<li>Tea</li>
</ul>
<p>Click the button get the HTML content of the ul element.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myList").innerHTML;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_innerhtml_ul by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:03:58 GMT -->
</html>