HTML DOM Input Button disabled Property Last Updated : 02 Jan, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report The Input Button disabled Property in HTML DOM is used to set or return whether the Input Button Field should be disabled or not. Disabled elements are shown in gray by default and are unusable and un-clickable. Syntax: It returns a disabled property. buttonObject.disabled It is used to set the disabled Property. buttonObject.disabled = true|false Property Values: true: It specifies the button field is disabled.false: It has a default value. It specifies the button field is not disabled.Return Value: It returns a boolean value i.e. true if the Button field is disabled or false if the button field is not disabled. Example 1: This example returns the value of the disabled property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input Button disabled Property </title> </head> <body style="text-align:center;"> <h1>GeeksforGeeks</h1> <h2>HTML DOM Input Button disabled Property</h2> <form id="myGeeks"> <!-- Assigning button id --> <input type="button" id="GFG" onclick="myGeeks()" name="Geek_button" value="Submit"> </form> <p id="result"></p> <script> function myGeeks() { // Return Input Button disabled Property let btnDisabled = document.getElementById("GFG").disabled; document.getElementById("result").innerHTML = btnDisabled; } </script> </body> </html> Output: Example 2: This Example illustrates how to set the disabled Property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input Button disabled Property </title> </head> <body style="text-align:center;"> <h1>GeeksforGeeks</h1> <h2>HTML DOM Input Button disabled Property</h2> <form id="myGeeks"> <!-- Assigning button id --> <input type="button" id="GFG" onclick="myGeeks()" name="Geek_button" value="Submit"> </form> <p id="result"></p> <script> function myGeeks() { // Setting Input Button disabled Property let setBtnDisabled = document.getElementById("GFG").disabled = "true"; document.getElementById("result").innerHTML = setBtnDisabled; } </script> </body> </html> Output: Supported Browsers: Google ChromeInternet Explorer 10.0 +FirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML | DOM Input Color disabled Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML Web technologies HTML-DOM HTML-Property +2 More Practice Tags : Misc Similar Reads HTML DOM Button disabled Property The Button disabled property in HTML DOM is used to set or return whether a Button element would be disabled or not. A disabled element is un-clickable and unusable. It contains a boolean value. Syntax: It is used to return the button disabled property. buttonObject.disabledIt is used to set the but 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.S 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 disabl 2 min read HTML | DOM Input Color disabled Property The DOM Input Color disabled Property in HTML DOM is used to set or return whether a color picker should be disabled or not. A Disabled element is usually is unusable and un-clickable and are usually grey in color by default in all the Browser. This Property is used to reflect the HTML disabled attr 2 min read HTML | DOM Input URL disabled Property The DOM Input URL disabled Property is used to set or return whether the Input URL Field must be disabled or not. A disabled URL Field is un-clickable and unusable. It is a boolean attribute and used to reflect the HTML Disabled attribute. It is usually rendered in grey color by default in all the B 2 min read HTML DOM Input Tel disabled Property The DOM input tel disabled Property is used to set or return whether the input tel field must be disabled or not. A disabled tel field is un-clickable and unusable. It is a boolean attribute that reflects the disabled attribute. It is usually rendered in grey color by default in all the browsers. S 2 min read Like