集合的一个小发现
<c:forEach items="${sessionScope.singleProblems}" var="singleProblem" varStatus="statu">
<h4>${statu.count}.${singleProblem.title}</h4>
<c:if test="${user.roleId == 2}">
(正確答案是${singleProblem.answer})
</c:if>
<table class="table table-striped table-bordered">
<tr>
<td>A:<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${requestScope.StudentSingleProblemAnswer[statu.index].userAnswer eq 'A' ? 'checked' : 'disabled'} >${singleProblem.answerA}</label></td>
<td>B:<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${StudentSingleProblemAnswer[statu.index].userAnswer eq 'B' ? 'checked' : 'disabled'}>${singleProblem.answerB}</label></td>
</tr>
<tr>
<td>C:<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${StudentSingleProblemAnswer[statu.index].userAnswer eq 'C' ? 'checked' : 'disabled'}>${singleProblem.answerC}</label></td>
<td>D;<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${StudentSingleProblemAnswer[statu.index].userAnswer eq 'D' ? 'checked' : 'disabled'}>${singleProblem.answerD}</label></td>
</table>
</c:forEach>
<h4>${statu.count}.${singleProblem.title}</h4>
<c:if test="${user.roleId == 2}">
(正確答案是${singleProblem.answer})
</c:if>
<table class="table table-striped table-bordered">
<tr>
<td>A:<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${requestScope.StudentSingleProblemAnswer[statu.index].userAnswer eq 'A' ? 'checked' : 'disabled'} >${singleProblem.answerA}</label></td>
<td>B:<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${StudentSingleProblemAnswer[statu.index].userAnswer eq 'B' ? 'checked' : 'disabled'}>${singleProblem.answerB}</label></td>
</tr>
<tr>
<td>C:<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${StudentSingleProblemAnswer[statu.index].userAnswer eq 'C' ? 'checked' : 'disabled'}>${singleProblem.answerC}</label></td>
<td>D;<label><input type="radio" name="singleProblem_Answer_${statu.count}" ${StudentSingleProblemAnswer[statu.index].userAnswer eq 'D' ? 'checked' : 'disabled'}>${singleProblem.answerD}</label></td>
</table>
</c:forEach>
轉載于:https://www.cnblogs.com/mm163/p/10445297.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
- 上一篇: 解决浏览器刷新vuex数据丢失问题
- 下一篇: virtualvenv+django+u