get text from javascript code example
Example 1: 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 !";
Example 2: get value from textbox in vanilla javascript
document.getElementById("myText").value = "Johnny Bravo";