html edit text with js code example Example: change text of element js Click to copydocument.getElementById("p1").innerHTML = "New text!";