how to get innerhtml of div in javas code example Example: change innerhtml document.getElementById("p1").innerHTML = "New text!";