how to change button title js code example
Example 1: js change button text
<button id="buttonName">Old Text</button>
<script>document.getElementById('buttonName').innerText = 'New Text';</script>
Example 2: change button text by id click java
<input type="button" value="Button Text" id="myButton1"></input>