get the same text box value in javascript code example
Example: get string from textbox javascript
<input id="word">
var word = document.getElementById("word").value;
<input id="word">
var word = document.getElementById("word").value;