Tuesday, July 10, 2012

Asp.Net jQuery Get Values of Radio Button


In this post Asp.Net jQuery Get Values of Radio Button, we shall see on how to get values which are associated with the Radio Button controls using jQuery.

We can use the following script to get the values of a Radio Button


 alert($('label[for=' + $('#radActive').attr('id') + ']').html());

On click of a button uses the following script.

// Get RadioButton Value
$('#cmdGetRadioButtonValue').click(function(event) {
event.preventDefault();
      alert($('label[for=' + $('#radActive').attr('id') + ']').html());
      alert($('label[for=' + $('#radInActive').attr('id') + ']').html());
});

Search Flipkart Products:
Flipkart.com

No comments: