To change div content with JavaScript, we set the div’s innerHTML property.
For instance, we write
document.getElementById("content").innerHTML = "whatever";
to select the div with getElementById.
And then we set its innerHTML property to the content of it.