Enable/Disable Textbox on Click of Checkboxes.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 881
Include below jQuery Library:-
On change event we can write code and by using prop method,we can enable or disable textbox:-
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function ()
{
$('#chk_select').change(function()
{
var status = this.checked;
if(status)
$('#txt_employee').prop("disabled", false);
else
$('#txt_employee').prop("disabled", true);
})
})
</script>

Comments or Responses

Login to post response