innerhtml replace code example
Example 1: change innerhtml
document.getElementById("p1").innerHTML = "New text!";
Example 2: innerhtml mozilla
var boxElem = document.querySelector(".box");
boxElem.addEventListener("mousedown", logEvent);
boxElem.addEventListener("mouseup", logEvent);
boxElem.addEventListener("click", logEvent);
boxElem.addEventListener("mouseenter", logEvent);
boxElem.addEventListener("mouseleave", logEvent);