Input Button disabledProperty
Input Button Object
Examples
Example 1
Disable a button:
<script>
document.getElementById("firstbtn").disabled=true;
</script>
document.getElementById("firstbtn").disabled=true;
</script>
Output result:
Try it Yourself »
Definition and Usage
The disabled property sets or returns whether a button is available.
Disabled elements are unusable, i.e., cannot be clicked. Disabled elements are usually displayed in gray in browsers.
Syntax
Set the disabled property:
element.disabled=true|false
Return the disabled property:
element.disabled
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the disabled property
Input Button Object Other Extensions