how to change text of element in javascript code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: innerHTML
document.getElementById("Test").innerHTML = "<h1>Test</h1>";
document.getElementById("p1").innerHTML = "New text!";
document.getElementById("Test").innerHTML = "<h1>Test</h1>";