w3schools getelementbyid code example
Example 1: javascript get element by id
var element = document.getElementById("YourElementId");
Example 2: change innerhtml
document.getElementById("p1").innerHTML = "New text!";
var element = document.getElementById("YourElementId");
document.getElementById("p1").innerHTML = "New text!";