<html>
<body>
<h3>A demonstration of how to access a Text Field</h3>
<input type="text" id="myText" value="Some text...">
<p>Click the "Try it" button to get the text in the text field.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myText").value;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_get by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:53:36 GMT -->
</html>