Check out example codes for "javascript innerhtml". It will help you in understanding the concepts better.

Code Example 1

// .innerHTML method is used to change the html contents of a DOM object
document.getElementById("demo").innerHTML = "Paragraph changed!";

Code Example 2

document.getElementById("p1").innerHTML = "New text!";

Code Example 3

<html>

<body>


<p id="p1">Hello World!</p>


<script>

document.getElementById("p1").innerHTML = "New text!";

</script>


</body>

</html>

Code Example 4

table.innerhtml

Code Example 5

document.getElementById("example").innerHTML = "Paragraph changed!";

Learn ReactJs, React Native from akashmittal.com