I expect it will send out a list of color. In html, if inputs are list, they should be same name, but same name of radio inputs, they will be in same group, so how to separate each radio group, but all group still have same name, then I can use loop go get all value of the list at server side?
Besides, at client side, I need to check whether each group is selected, so how to use javascript or jquery to select all radio groups, not all radio buttons.
<form method="post">
Car A: <input type="radio" name="color[]"/>red <input type="radio" name="color[]"/>yello<br/>
Car B: <input type="radio" name="color[]"/>red <input type="radio" name="color[]"/>yello<br/>
Car C: <input type="radio" name="color[]"/>red <input type="radio" name="color[]"/>yello<br/>
<input type="submit"/>
</form>
Each group should have a different name for all of it’s radio buttons.
Checking if all the groups were selected:
You can limit the selector to only elements which their
nameattributes begin withcolor: