input to string js code example
Example 1: javascript toutcstring
let today = new Date('Wed, 14 Jun 2017 00:00:00 PDT');
let UTCstring = today.toUTCString(); // Wed, 14 Jun 2017 07:00:00 GMT
Example 2: get input string js
document.getElementById('textbox_id').value to get the value of desired box
For example, document.getElementById("searchTxt").value;