javascript - How to disable/enable input field on click with jQuery -
how enable/disable input field on click jquery?
i experimenting with:
$("#fullname").removeattr('disabled'); which removes disabled="disabled" input field:
<input id="fullname" style="width: 299px" value="marko" disabled="disabled" /> but how add again click on button or how disable input field on click?
for jquery version 1.6+ use prop:
$('#elementid').click(function(){         $('#fullname').prop('disabled', true\false); }); for older versions of jquery use attr:
$('#elementid').click(function(){         $('#fullname').attr('disabled', 'disabled'\''); }); 
Comments
Post a Comment