In this post Asp.Net jQuery checkbox click event
handler, we shall see on how to handle the clicked/checked event of a checkbox
using jQuery.
We can use the click() event to track the clicked/checked events of a checkbox
as follows.
// Checkboxes Checked Event
$('#chkStatus').click(function()
{
alert($('#chkStatus').attr('checked') ? true
: false);
alert($('#chkStatus:checked').val()
? true : false);
alert($('#chkStatus:checked').is(':checked'));
});
All 3 alerts
mentioned return the same result, the checked state of the checkbox, any one of
it can be used.
To see a
full example using jQuery and Checkbox refer to the post Asp.Net jQuery checkbox Tutorial.
Related Posts
1 comment:
Wow awesome explanation ...very good in content delivery
sharepoint 2013 training
Post a Comment