function Disable() { if (event.button == 2) { alert("This action is not possible") } } document.onmousedown=Disable;