JQuery | Remove “disabled” attribute from an element Last Updated : 29 May, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report There is an Input Element which is disabled, the task is to enable it using JQuery. Here are a few examples discussed. To understand example first few methods to know. JQuery prop() method This method set/return properties and values of selected elements. If we use this method to return the property value, it will return the value of the FIRST selected element. If we use this method to set property values, it will set one or more than one property/value pairs for set of selected elements. Syntax: Return the value of property: $(selector).prop(property) Set the property and value: $(selector).prop(property, value) Set the property and value using function: $(selector).prop(property, function(index, currentValue)) Set multiple property and values: $(selector).prop({property:value, property:value, ...}) JQuery removeAttr() method This method removes one or more than one attributes from the matched elements. Syntax: $(selector).removeAttr(attribute) Parameters: attribute:This parameter is required. It specifies one or more than one attributes to remove. If want to remove several attributes, Use a space among the attribute names. Example-1:In this example the input element is enabled by prop() method by setting the disabled property to false. html <!DOCTYPE HTML> <html> <head> <title> JQuery | Remove “disabled” attribute. </title> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"> </script> </head> <body style = "text-align: center;"> <h1 style = "color: green;" > GeeksForGeeks </h1> Input Box: <input type = "text" disabled = "disabled" class = "Disable" value = ""/> <br> <br> <button id = "enable"> click to Enable </button> <script> $("#enable").click(function(event) { event.preventDefault(); $('.Disable').prop("disabled", false); }); </script> </body> </html> Output: Before clicking on the button: After clicking on the button: Example-2:In this example the input element is enabled by removeAttr() method by removing the disabled property. html <!DOCTYPE HTML> <html> <head> <title> JQuery | Remove “disabled” attribute. </title> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"> </script> </head> <body style = "text-align: center;"> <h1 style = "color: green;" > GeeksForGeeks </h1> Input Box: <input type = "text" disabled = "disabled" class = "Disable" value = ""/> <br> <br> <button id = "enable"> click to Enable </button> <script> $("#enable").click(function(event) { event.preventDefault(); $('.Disable').removeAttr("disabled") }); </script> </body> </html> Output: Before clicking on the button: After clicking on the button: Comment More infoAdvertise with us Next Article HTML disabled Attribute P PranchalKatiyar Follow Improve Article Tags : JavaScript Web Technologies jQuery-Questions Similar Reads How to remove âdisabledâ attribute from HTML input element using JavaScript ? In HTML, we use input elements for user input. The 'disabled' property helps prevent interaction with these elements. For example, if we only want users over 18 to input their Adhar card numbers, we can use JavaScript to remove the 'disabled' attribute when the user enters an age greater than 18. Th 2 min read How to find all elements that are disabled in jQuery ? In this article, we will learn how to find all elements on the page that are disabled using jQuery. Approach: The :disabled selector can be used to get all elements on the page that are currently disabled. These elements are iterated over using the each() method. The elements can then be individuall 2 min read HTML <select> disabled Attribute The disabled attribute for <select> element in HTML is used to specify that the select element is disabled. A disabled drop-down list is un-clickable and unusable. It is a boolean attribute. Syntax: <select disabled>option values...</select> Example: html <!DOCTYPE html> < 1 min read How to enable/disable a button using jQuery ? Enabling/disabling a button using jQuery involves altering its functionality to either accept user input or not. This is typically done by manipulating its 'disabled' property or attribute through jQuery methods like `.prop()` or .attr().To enable/disable a button using jQuery, you'll need a basic H 2 min read HTML <keygen> disabled Attribute The HTML <keygen> disabled attribute is a boolean attribute that indicates whether the <keygen> element is disabled or not. It is used to keep a user from using an input field until some conditions would be applied to it. Note: We can use JavaScript to change the value of the disabled 1 min read How to remove clickable behavior from a disabled link using jQuery ? In this article, we will see how to remove the clickable behavior from a disabled link using jQuery. To remove the clickable behavior, we will use the removeAttr() method. The removeAttr() method is used to remove one or more attributes from the selected elements. Syntax: $(selector).removeAttr(attr 1 min read Like