change element javascript code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: how to change html element in javascript
document.getElementbyid.innerHTML = "text";
document.getElementById("p1").innerHTML = "New text!";
document.getElementbyid.innerHTML = "text";