how to change a button text and color by javascript based on value code example
Example: javascript change color of button
document.getElementById("button").style.background='#000000';
document.getElementById("button").style.background='#000000';