set button disabled code example
Example 1: javascript disable button
//disable the button
document.getElementById(BUTTON_ID).disabled = true;
//reable the button
document.getElementById(BUTTON_ID).removeAttribute('disabled');
Example 2: style disabled button
button:disabled,
button[disabled]{
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}
Example 3: html button disabled
<button type="button" disabled>This button is disabled</button>