how to change the text in a div with javascript code example Example: javascript set text of div document.getElementById("content").innerHTML = "whatever";