disable write button in javascript 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: how to disable all buttons in javascript
$("input[type=button]").attr("disabled", "disabled");