Take a look at the code below. I need a Javascript code that will check the checkbox selection for each question. I've searched the Internet and found many Javascript code that only checks one question. But I need a code that can do the check for multiple questions. Each question should have a different max selection. Like Question 1 can have max 2 selection, question 2 can have max 4 selections. Any one can show me the way to this?

<br>Question 1:
<input type="checkbox" name="answer[148][]" value="761" id="60833.148.761" /> <label for="60833.148.761">Answer 1</label><br />
<input type="checkbox" name="answer[148][]" value="762" id="60833.148.762" /> <label for="60833.148.762">Answer 2</label><br />
<input type="checkbox" name="answer[148][]" value="922" id="60833.148.922" /> <label for="60833.148.922">Answer 3</label><br />
<input type="checkbox" name="answer[148][]" value="923" id="60833.148.923" /> <label for="60833.148.923">Answer 4</label><br />
<input type="checkbox" name="answer[148][]" value="924" id="60833.148.924" /> <label for="60833.148.924">Answer 5</label><br />
<input type="checkbox" name="answer[148][]" value="925" id="60833.148.925" /> <label for="60833.148.925">Answer 6</label><br />
<br>Question 2:
<input type="checkbox" name="answer[193][]" value="926" id="60833.193.926" /> <label for="60833.193.926">Answer 1</label><br />
<input type="checkbox" name="answer[193][]" value="927" id="60833.193.927" /> <label for="60833.193.927">Answer 2</label><br />
<input type="checkbox" name="answer[193][]" value="928" id="60833.193.928" /> <label for="60833.193.928">Answer 3</label><br />
<input type="checkbox" name="answer[193][]" value="929" id="60833.193.929" /> <label for="60833.193.929">Answer 4</label><br />
<input type="checkbox" name="answer[193][]" value="930" id="60833.193.930" /> <label for="60833.193.930">Answer 5</label><br />
<input type="checkbox" name="answer[193][]" value="931" id="60833.193.931" /> <label for="60833.193.931">Answer 6</label><br />