how to change the content of a div using javascript code example
Example 1: change innerhtml
document.getElementById("p1").innerHTML = "New text!";
Example 2: javascript replace content of div
document.getElementById("test").innerHTML = "new content"
Example 3: how to change text of div in javascript
document.getElementById("content").innerHTML = "whatever";