javascript document get element by id text code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: value from getelementbyid
document.getElementById('numbers').value
Example 3: set text of dom element
document.getElementById("myBtn").textContent = 'Hello World';