<!DOCTYPE html>
<html>
<body>

<input type="submit" id="mySubmit" value="Submit form">

<p>Click the "Try it" button to change the text displayed on the Submit button.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    document.getElementById("mySubmit").value = "newSubmitButtonValue";
}
</script>

</body>
</html>