<html>
<body>
<h3>A demonstration of how to access an Input Button</h3>
<p>Click the button to get the text that is displayed on the button.</p>
<input type="button" id="myBtn" onclick="myFunction()" value="Try it">
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myBtn").value;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_button_get by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:05:47 GMT -->
</html>