Accessing user input through js

JavaScript
var x = document.getElementById("myText").value;
Source

Also in JavaScript: