You are here: Reference > JavaScript > client-side > HTML DOM > properties > isDisabled

isDisabled property

Browser support:
Returns a Boolean value that indicates whether the object is disabled.
The disable status can be modified with the disabled property.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Boolean that indicates whether the user can interact with the object.
One of the following values:
Interaction is enabled.
Interaction is disabled.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the isDisabled property:
    <script type="text/javascript">
        function ToggleDisable () {
            var myObj = document.getElementById ("mySelect");
            if (myObj.isDisabled) {
                myObj.disabled = (myObj.isDisabled == true)? false : true;
            } else {
                myObj.disabled = (myObj.disabled == true)? false : true;
    <button onclick="ToggleDisable ();">Enable/disable input object</button>
    <input id="mySelect" type="text" value="Some content"/>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content