see text of input in js code example
Example 1: Javascript get text input value
var inputValue = document.getElementById("myTextInputID").value;
Example 2: input js
var answer = prompt("Ask your question here");
var inputValue = document.getElementById("myTextInputID").value;
var answer = prompt("Ask your question here");