当前位置 : 主页 > 编程语言 > c++ >

<c:foreach>指定循环次数

来源:互联网 收集:自由互联 发布时间:2021-06-23
c:forEach begin ="0" end ="4" var ="i" c:set var ="ans" value ="${list[i]}" / tr td width ="15%" 答案${i+1 } font color ="red" * / font : / td td width ="85%" input type ="text" value ="c:if test=" ${fn:length(list) = i+1}"${ans.answer
<c:forEach begin="0" end="4" var="i">
    <c:set var="ans" value="${list[i]}" />
    <tr>
        <td width="15%">答案${i+1 }<font color="red">*</font></td>
        <td width="85%">
            <input type="text" value="<c:if test="${fn:length(list) >= i+1}">${ans.answer }</c:if>" name="answers">
        </td>
    </tr>
</c:forEach>
网友评论