Check out example codes for "innerhtml". It will help you in understanding the concepts better.
Code Example 1
document.getElementById("p1").innerHTML = "New text!";
Code Example 2
document.getElementById("demo").innerHTML = ""; // Replaces the content of <p> with an empty string
Code Example 3
<html>
<body>
<p id="p1">Hello World!</p>
<script>
document.getElementById("p1").innerHTML = "New text!";
</script>
</body>
</html>
Code Example 4
var x = document.getElementById("myList").innerHTML;
Code Example 5
document.getElementById("myP").innerHTML = "Hello Dolly.";
document.getElementById("myDIV").innerHTML = "How are you?";
Code Example 6
alert(document.getElementById("demo").innerHTML);
Learn ReactJs, React Native from akashmittal.com