In this post Asp.Net jQuery checkbox get value,
we shall see on how to get value of a checkbox using jQuery.
We can get the value of a checkbox using the following
syntax.
alert($('label[for=' + $('#chkStatus').attr('id') + ']').html());
To get the checked value, on click of a button uses the following script.
To get the checked value, on click of a button uses the following script.
// Get CheckBox Value
$('#cmdGetCheckboxValue').click(function(event) {
event.preventDefault();
alert($('label[for='
+ $('#chkStatus').attr('id') + ']').html());
});
To see a
full example using jQuery and Checkbox refer to the post Asp.Net jQuery checkbox Tutorial.
Related Posts
No comments:
Post a Comment