javascript change inner content code example
Example 1: change innerhtml
document.getElementById("p1").innerHTML = "New text!";
Example 2: change innertext javascript
element.innerText = "Hello World";
document.getElementById("p1").innerHTML = "New text!";
element.innerText = "Hello World";