how to disable a button in javascript based on condition timer code example Example: javascript disable button document.getElementById(BUTTON_ID).disabled = true;