javascript input field
<!DOCTYPE html>
<html>
<head>
<title>
HTML DOM Input Text Object
</title>
</head>
<body>
<h1>GeeksForGeeks</h1>
<h2>DOM Input Text Object</h2>
<input type="text" id="text_id" value="Hello Geeks!">
<p>Click on button to display the text field</p>
<button onclick="myGeeks()">Click Here!</button>
<p id="GFG"></p>
<!-- script to access text field -->
<script>
function myGeeks() {
var txt = document.getElementById("text_id").value;
document.getElementById("GFG").innerHTML = txt;
}
</script>
</body>
</html>