How to set Text of Div in Javascript?
Use the textContent property to change the text of a div element, e.g. div.textContent = 'Replacement text'. The textContent property will set the text of the div to the provided string, replacing any of the existing content.'
javascript set text of div
document.getElementById("content").innerHTML = "whatever";
javascript update text in div
fieldNameElement.innerHTML = "My new text!";