get text from innerhtml javascript 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";