Open In App

HTML | DOM Input Reset disabled Property

Last Updated : 26 Aug, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The Input Reset disabled Property in HTML DOM is used to set or return a boolean value which represents a reset button field should be disabled or not. By default, the disabled elements are shown in gray and are unusable and unclickable. 

Syntax: 

  • It returns the disabled property.
resetObject.disabled
  • It is used to set the disabled property.
resetObject.disabled = true|false

Property Values: 

  • true: It specifies the reset button is disabled.
  • false: It specifies the reset button is not disabled.

Default Value: false

Return Value: It returns a boolean value i.e. true if the reset button field is disabled or false if the reset field is not disabled. 

Example 1: This example returns the value of disabled property. 

HTML




<!DOCTYPE html>
<html>
<head>
    <title>
        HTML DOM Input reset disabled property
    </title>
</head>
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksForGeeks
    </h1>
    <h2>DOM Input reset disabled Property</h2>
    <input type="reset" id="GeekReset" name="geeks"
            value="Reset form" disabled>
    <p>
        Click on below button to return the Property
    </p>    
    <button onclick="myGeeks()">
        Click Here
    </button>
    <p id="Geek_p" style="font-size:30px; color:green;"></p>
    <script>
        function myGeeks() {
             
            // Return Input Reset disabled Property
            var x = document.getElementById("GeekReset").disabled;
            document.getElementById("Geek_p").innerHTML = x;
        }
    </script>
</body>
</html>


Output: 

Before Clicking the Button: 

 

After Clicking the Button: 

 

Example 2: This example illustrates how to set the Input reset disabled Property. 

HTML




<!DOCTYPE html>
<html>
<head>
    <title>
        HTML DOM Input reset disabled property
    </title>
</head>
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksForGeeks
    </h1>
    <h2>DOM Input reset disabled Property</h2>
    <input type="reset" id="GeekReset" name="geeks"
            value="Reset form" disabled>
    <p>
        Click on below button to set the Property
    </p>   
    <button onclick="myGeeks()">
        Click Here
    </button>
    <p id="Geek_p" style="font-size:30px; color:green;"></p>
     
    <!-- Script to set Input Reset disabled property -->
    <script>
        function myGeeks() {
 
            var x = document.getElementById("GeekReset").disabled
                    = false;
                     
            document.getElementById("Geek_p").innerHTML = x;
        }
    </script>
</body>
</html>


Output: 

Before Clicking the Button: 

 

After Clicking the Button: 

 

Supported Browsers: The browser supported by DOM Input Reset disabled Property are listed below:

  • Google Chrome 1 and above
  • Edge 12 and above
  • Firefox 1 and above
  • Opera
  • Safari 1 and above


Similar Reads

HTML | DOM Input Reset name Property
The Input Reset name Property in HTML DOM is used to set or return the value of name attribute of a reset field. The name attribute is required for each input field. If the name attribute is not specified in an input field then the data of that field would not be sent at all. Syntax: It returns the Input reset name property.resetObject.nameIt is us
2 min read
HTML | DOM Input Reset type Property
The Input Reset type Property in HTML DOM is used to return the type of form element of the reset field. It always returns the "reset" for an Input reset field. Syntax: resetObject.type Return Value: It returns a string value that represents the type of form element the Input reset field is. Below program illustrates the reset type property in HTML
1 min read
HTML | DOM Input Reset value Property
The Input Reset value Property in HTML DOM is used to set or return the value of the value attribute of a Input reset Field. The value attribute specifies the text displayed in the reset Field. Syntax: It returns the Input Reset value Property.resetObject.valueIt is used to set the Input Reset value Property.resetObject.value = text Property Value:
2 min read
HTML | DOM Input Reset autofocus Property
The Input Reset autofocus Property in HTML DOM is used to set or return whether the Input reset Field should get focus or not when the page loads. It reflects the HTML autofocus attribute. Syntax: It returns the autofocus property.resetObject.autofocusIt is used to set the autofocus property.resetObject.autofocus = "true|false" Property Values: tru
2 min read
HTML | DOM Input Reset form Property
The Input Reset form Property in HTML DOM is used for return the reference of the form containing the input reset button field. It is read-only property. Syntax: resetObject.form Return Values: It returns a string value which specify the reference of the form containing the Input reset field Below example illustrates the Input reset form property.
1 min read
HTML | DOM Input reset defaultValue Property
The Input reset defaultvalue Property in HTML DOM is used to set or return the default value of a reset field. This property is used to reflect the HTML value attribute. The main difference between the default value and value is that the default value indicates the default value and the value contains the current value after making some changes. Th
2 min read
HTML | DOM Input Checkbox disabled Property
The Input Checkbox disabled property in HTML DOM is used to set or return whether the Input Checkbox field must be disabled or not. A disabled checkbox is unclickable and unusable. It is a boolean attribute and used to reflect the HTML Disabled attribute. Syntax: It returns the Input Checkbox disabled property. checkboxObject.disabled It is used to
2 min read
HTML | DOM Input Datetime disabled Property
The Input Datetime disabled property is used to set or return whether a datetime field should be disabled, or not. An element becomes unusable and un-clickable if it is disabled. Such elements are generally rendered in gray by browsers. The HTML disable attribute is reflected by the Datetime disabled property. Syntax: Returning the disabled propert
2 min read
HTML | DOM Input Date disabled Property
The Input date disabled property is used to set or return whether a date field should be disabled, or not. An element becomes unusable and un-clickable if it is disabled. Such elements are generally rendered in gray by browsers. The HTML disable attribute is reflected by the Date disabled property.Syntax: To return the disabled property: inputdateO
2 min read
HTML DOM Input DatetimeLocal disabled Property
The Input datetimeLocal disabled property in HTML DOM is used to set or return the local DateTime field which is disabled, or not. If an element is disabled then it becomes unusable and un-clickable. Such elements are generally rendered in gray by browsers. The HTML disable attribute is reflected by the DatetimeLocal disabled property.Syntax: It re
2 min read
Article Tags :