input element javascript, w3schools.com code example
Example 1: HTML DOM Input Text Object
<!DOCTYPE html>
<html>
<body>
<input type="text" id="myText" value="Here is were your Text Input goes">
<button onclick="myFunction()">Try it</button>
<p id="output"></p>
<script>
function myFunction() {
var x = document.getElementById("myText").value;
document.getElementById("output").innerHTML = x;
}
</script>
</body>
</html>
Example 2: how to get the input of a textbox in html
<script>
function getTextBox(){
var k = document.getElemntById('myTextBox').value
alert(k)
}
</script>
<input type="text" id="myTextBox">
<button onclick="getTextBox()">Get Text Input</button>