Código HTML:
function seleccion(){ $(document).ready(function(){ $('input:radio[name=radio]').change(function(){ var ver =$(this).val(); $('#ceddep').attr('value', ver);<!-- no se si esto esta bien?--> }); }); } <tr> <td align='center'><input type='radio' name='radio' id='radio' value='05623484' onclick='seleccion()' /></td> <td i>05623484</td> <td>Flores Carmen</td> <td>Conyuge</td> <td width='20%'>R</td> <td width='5%'><img src='img/no_picture.jpg' width='40' height='48'/></td> </tr> <tr> <td align='center'><input type='radio' name='radio' id='radio' value='05717441' onclick='seleccion()' /></td> <td id='obtener'>05717441</td> <td>Bonias Antonio</td> <td>Titular</td> <td width='20%'>R</td> <td width='5%'><img src='img/no_picture.jpg' width='40' height='48'/></td> </tr> <tr> <input type="hidden" name="ceddep" id="ceddep" value="x">