div content javascript code example
Example 1: javascript set text of div
document.getElementById("content").innerHTML = "whatever";
Example 2: set text of dom element
document.getElementById("myBtn").textContent = 'Hello World';
document.getElementById("content").innerHTML = "whatever";
document.getElementById("myBtn").textContent = 'Hello World';