1//disable the button
2document.getElementById(BUTTON_ID).disabled = true;
3//reable the button
4document.getElementById(BUTTON_ID).removeAttribute('disabled');
1let button = document.getElementById("btn");
2button.setAttribute("disabled","true");
3button.style.pointerEvents = "none";
4button.style.opacity = 0.5;