set text inside div using js code example
Example 1: How to write inside a div using javascript
document.getElementById('log').innerHTML += '<br>Some new content!';
Example 2: javascript update text in div
fieldNameElement.innerHTML = "My new text!";