On my form I havea set of radio buttons. Here's the mark up:
When the form is submitted I want to check that one of them is checked. What's the best way to go about this? I was thinking of looping through them all and making a flag to set if one of them is checked, and then check the flag after the loop and if it's false throw an error.
Any help is appreciated, cheers.
以上就是Validating a radio button is checked with jQuery的详细内容，更多请关注web前端其它相关文章！