-1

In Javascript code on the browser, given the name of a group of radio buttons, is there a way to directly find out which button is checked without iterating through each button one by one to check its checked property?

Old Geezer
  • 14,854
  • 31
  • 111
  • 198

1 Answers1

0

Yes with jQuery. If the name of the group is state, then:

$("[name=state]:checked").val()
Old Geezer
  • 14,854
  • 31
  • 111
  • 198