innerhtml replace element code example
Example: change element text innerhtml keeping the elements or tags inside
document.getElementById("tagname").firstChild.data = text;
document.getElementById("tagname").firstChild.data = text;