how to code a click button in javascript that is changes the buttom code example
Example 1: how to change the text in a button on onclick
var btn = document.getElementById("mybtn");
btn.value = 'my value'; // will just add a hidden value
btn.innerHTML = 'my text';
Example 2: change button text by id click java
<input type="button" value="Button Text" id="myButton1"></input>