html页面:
<c:if test="${courseStandardVos != null }">
<c:set var="index" value="0"/>
<c:forEach items="${courseStandardVos }" var="courseStandardVo">
<tr>
<td width="10%" align="center" valign="middle">${courseStandardVo.firstName}</td>
<td width="10%" class="border_l" align="center" valign="middle">${courseStandardVo.secondName}</td>
<td width="60%" align="left" valign="middle">${courseStandardVo.thirdName}</td>
<c:set var="index" value="${index+1}"/>
<td width="20%" align="center" valign="middle" name="grade" id="grade">
<input type="radio" id="score_five1" class="radio_ipt" name="radio${index}" value="5"/><label
for="score_five1">5</label>
<input type="radio" id="score_five2" class="radio_ipt" name="radio${index}" value="4"/><label
for="score_five2">4</label>
<input type="radio" id="score_five3" class="radio_ipt" name="radio${index}" value="3"/><label
for="score_five3">3</label>
<input type="radio" id="score_five4" class="radio_ipt" name="radio${index}" value="2"/><label
for="score_five4">2</label>
<input type="radio" id="score_five5" class="radio_ipt" name="radio${index}" value="1"/><label
for="score_five5">1</label>
</td>
</tr>
</c:forEach>
</c:if>
jquery代码:
$("#submitGrade").click(function () {
$("#courseStandardVoId tr td").find("input[type='radio']").each(function(){
if($(this).is(":checked")){
alert($(this).val());
}
});
}