<html>
<body>
<input type="submit" id="mySubmit" value="Submit form">
<p>Click the "Try it" button to display the text displayed on the Submit button.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("mySubmit").value;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>