Accessing user input through js code example Example: Accessing user input through js var x = document.getElementById("myText").value;