1//disable the button
2document.getElementById(BUTTON_ID).disabled = true;
3//reable the button
4document.getElementById(BUTTON_ID).removeAttribute('disabled');
1//Using Javascript
2//Disabling a html button
3
4document.getElementById("Button").disabled = true;
5//Enabling a html button
6
7document.getElementById("Button").disabled = false;
8
9
10//Using jQuery
11//Disabling a html button
12
13$('#Button').attr('disabled','disabled');
14//Enabling a html button
15
16$('#Button').removeAttr('disabled');