验证测验的单选按钮

Need to validate radio buttons am developing a quiz page i can only validate 1 set of radio buttons any help be great below is my code. If a user hits the submit button without answering a question I want a alert message displayed saying u must answer whatever question they didnt answer. Any ideas as to why the jquery wont work thanks

<!doctype html>
  <html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>

<script type="text/javascript" src="js/jquery.js"></script>

                     <script type="text/javascript">
                     $('#quizForm').on('submit', function() {
    var emptyCount = 0;
    $('li').each(function() {
        var found = false;
        $(this).find('input[type=radio]').each(function() {
            if ($(this).prop('checked')) {
                found = true;
            }
        });
        if (!found) {
            emptyCount++;
        }
    });
    if (emptyCount > 0) {
        alert('Missing checks:' + emptyCount);
        return false;
    }
    return true;
                     </script>


                  <form action='mail.php' method='post' id='quizForm' id='1' name='quizForm' onSubmit='form()'>
    <ol>
        <li>
            <h3>1 x 1 =</h3>
            <div>
                <input type='radio' name='answerOne' id='answerOne' value='A' />
                <label for='answerOneA'>A)1</label>
            </div>
            <div>
                <input type='radio' name='answerOne'  id='answerOne' value='B' />
                <label for='answerOneB'>B)2</label>
            </div>
            <div>
                <input type='radio' name='answerOne' id='answerOne' value='C' />
                <label for='answerOneC'>C)3</label>
            </div>
        </li>
        <li>
            <h3>1 x 6 =</h3>
            <div>
                <input type='radio' name='answerTwo' id='answerTwo' value='A' />
                <label for='answerTwoA'>A)5</label>
            </div>
            <div>
                <input type='radio' name='answerTwo' id='answerTwo' value='B' />
                <label for='answerTwoB'>B)6</label>
            </div>
            <div>
                <input type='radio' name='answerTwo' id='answerTwo' value='C' />
                <label for='answerTwoC'>C)4</label>
            </div>
        </li>
        <li>
            <h3>2 x 8 =</h3>
            <div>
                <input type='radio' name='answerThree' id='answerThree' value='A' />
                <label for='answerThreeA'>A)14</label>
            </div>
            <div>
                <input type='radio' name='answerThree' id='answerThree' value='B' />
                <label for='answerThreeB'>B)12</label>
            </div>
            <div>
                <input type='radio' name='answerThree' id='answerThree' value='C' />
                <label for='answerThreeC'>C)16</label>
            </div>
        </li>
    </ol>
    <input type="submit" />
</form>

</body>
</html>

Writing a custom validator for your code on here would probably just be excessive. I'd use bValidator and call it a day.

See their sections on "radio groups".

http://bojanmauser.from.hr/bvalidator/#groups

First: you should not have the same id multiple times on one page. So the id of each answer should be different.

Anyway you can go through all the li elements and check if there's a checked radio in it.

$('form').on('submit', function() {
    var emptyCount = 0;
    $('li').each(function() {
        var found = false;
        $(this).find('input[type=radio]').each(function() {
            if ($(this).prop('checked')) {
                found = true;
            }
        });
        if (!found) {
            emptyCount++;
        }
    });
    if (emptyCount > 0) {
        alert('Missing checks');
        return false;
    }
    return true;
});