modify div in javascript code example
Example 1: javascript set text of div
document.getElementById("content").innerHTML = "whatever";
Example 2: change text of element js
document.getElementById("p1").innerHTML = "New text!";
document.getElementById("content").innerHTML = "whatever";
document.getElementById("p1").innerHTML = "New text!";