change text of element js

JavaScript
document.getElementById("p1").innerHTML = "New text!";
Source

Also in JavaScript: