Please read the following HTML, and answer the question.
<body style="text-align: center">
<script language="JavaScript">
function prepareUpdateRow(){
var frm = document.resultForm;
if(selectedCheckboxCount(frm) < 1){
alert("");
return ;
}else if(selectedCheckboxCount(frm) > 1){
alert(", ");
return ;
}
frm.action="training.training_P_TB_FeedbackPrepareUpdate.do";
frm.submit();
}
</script>
<table border="1">
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td><input type="checkbox" name="cbx1" value="51" /> </td>
<td>EOS </td>
</tr>
<tr>
<td><input type="checkbox" name="cbx2" value="52" /> </td>
<td>EOS </td>
</tr>
<tr>
<td><input type="checkbox" name="cbx3" value="53" /> </td>
<td>EOS </td>
</tr>
<tr>
<td><input type="checkbox" name="cbx" value="54" /> </td>
<td>1--515 </td>
</tr>
</table>
<a href="javascript:prepareUpdateRow();"></a>
</body>
in the above code, the implementation of the function selectedCheckboxCount is missing. Please help the implementation (to determine how many checkbox are selected)
hint: the method to determine whether checkbox is selected is: object.checked = true/false;