Free programming examples and instructions

Remove disabled attribute from html control using jQuery

Demo and Code for how to remove disabled attribute from jQuery.

by Athil

Posted on 01 Jan 0001 Category: jQuery Views: 1676

Here I am going to show how to remove 'disabled' attribute from HTML control using jQuery.


$('#txt1').prop('disabled', false);
Where 'txt1' is control id.

Full Demo code

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <title>Demo jQuery remove disbaled attriute from html control</title>
    <h1>Demo jQuery remove disbaled attriute from html control</h1>
    <input type ="text" id="txt1" disabled="true">
    <button id="disable" onclick="removedisable();">Set enabled</button><br/>

        <script type="text/javascript" src="js/jquery.min.js" ></script>

       <script type="text/javascript">
           function removedisable()
               $('#txt1').prop('disabled', false);




Leave a Comment:

Click here to register

Popular articles