how would i loop through all the radio boxes on the page and get the value? have the following command got anything to do 开发者_如何学JAVAwith it?
$('input[type=radio]')
Update:
To loop through checked ones, you can use the :checked
filter selector this way:
$(':radio:checked').each(function(){
alert($(this).val());
});
You can use the each
method like this with :radio
(shortcut) filter selector:
$(':radio').each(function(){
alert($(this).val());
});
精彩评论