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?
Yes with jQuery. If the name of the group is state
, then:
$("[name=state]:checked").val()