change click button code example
Example 1: javascript change button onclick
function Bar() {
document.getElementById("a").onclick = Foo();
}
Example 2: 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 3: change button text by id click java
<input type="button" value="Button Text" id="myButton1"></input>