How to disable input field using jquery

How take home disable/enable an give away box with jQuery?


We bottle easily disable display box(textbox,textarea) using alter attribute to “disabled”.

$(‘elementname’).attr(‘disabled’,’disabled’);

Turn to enable disabled component we need within spitting distance remove “disabled” normal from this discussion.

$(‘elementname’).removeAttr(‘disabled’);

Dispute

<html > <head>    <title>ed</title>       <script src="../../Scripts/jquery-1.4.1.min.ready(function () {             $('#btn1').click(function () {                $('input').attr('disabled', 'disabled');             });             $('#btn2').click(function () {                $('input').removeAttr('disabled');             });          });       </script>    </head> <body> <div> <input type="text" id="tt1" /><br />    <button type="button" id="btn1">Disable</button>    <button type="button" id="btn2">Enable</button> </div> </body> </html>
Kickstart Your Duration

Reach the summit of certified by termination the course

Get Started

Itchy legs after shower no rash