JavaScript How to disable the button in JavaScript? This article explains how to disable a button using JavaScript. The simplest method is to utilize the `disabled` attribute of the button element. Simply set this attribute to `true` to disable the button.