how to change text in button click html 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: html how to change button text
<input type="button" value="Button Text Here">