Posted By

wesleymacente on 10/19/10


Tagged


Versions (?)

PEGAR VALOR RADIO


 / Published in: jQuery
 

  1. $(document).ready(function() {
  2. $('#pegar_valor').click(function() {
  3. var valor = "";
  4. //Executa Loop entre todas as Radio buttons com o name de valor
  5. $('input:radio[name=valor]').each(function() {
  6. //Verifica qual está selecionado
  7. if ($(this).is(':checked'))
  8. valor = parseInt($(this).val());
  9. })
  10. alert(valor);
  11. })
  12. })

Report this snippet  

You need to login to post a comment.