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