Tuesday, July 10, 2012

Asp.Net jQuery get checked option in RadioButtonList


In this post Asp.Net jQuery get checked option in RadioButtonList, we shall see on how to get the radio button which is checked in a RadioButtonList using jQuery.

We can use the following script to get the checked radio button in a RadioButtons


$('#radListCity input:radio[checked]').each(function() {
        alert($(this).attr('id') + ' => ' + $(this).is(':checked'));
});

On click of a button uses the following script.

$('#cmdLoopList').click(function(event) {
    event.preventDefault();
    $('#radListCity input:radio[checked]').each(function() {
        alert($(this).attr('id') + ' => ' + $(this).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: