disable click javascript code example
Example 1: javascript disable right click
document.addEventListener('contextmenu', event => event.preventDefault());
Example 2: javascript disable button
//disable the button
document.getElementById(BUTTON_ID).disabled = true;
//reable the button
document.getElementById(BUTTON_ID).removeAttribute('disabled');