dom set text value code example
Example 1: javascript set input field value
document.getElementById("myInputID").value = "My Value"; //set value on myInputID
Example 2: textcontent in javascript
// The textContent property sets or returns the text content of the specified node
// read text content from id ..
let text = document.getElementById('id').textContent;
console.log(text);
// change text content of id ..
document.getElementById('id').textContent = "text is changed now !";