Tuesday, July 10, 2012

Asp.Net jQuery Get Checked status of Radio Button


In this post Asp.Net jQuery Get Checked status of Radio Button, we shall see on how to get the current checked status of a Radio Button using jQuery.

We can use the checked property of the Radio Button to know the status of the Radio Button as follows.


alert($('#radActive:checked').is(':checked'));

To set the checked status, on click of a button uses the following script.

// Get Status of RadioButton
$('#cmdGetCheckedStatus').click(function(event) {
      event.preventDefault();
      alert($('#radActive:checked').is(':checked'));
      alert($('#radInActive:checked').is(':checked'));
});

To see a full example using jQuery and Radio Buttons refer to the post Asp.Net jQuery Radio Button Tutorial



Related Posts


Search Flipkart Products:
Flipkart.com

No comments: