java - jsp页面foreach遍历list中map问题
PHPz
PHPz 2017-04-18 10:44:04
0
1
859
PHPz
PHPz

学习是最好的投资!

reply all(1)
左手右手慢动作

Backend code example:

JSP code:

<!--遍历 answers-->
<c:forEach items="${answers}" var="answer" varStatus="status">

    <!-- 遍历 map -->
    <c:forEach items="${answer}" var="entry">
        <input name="answer_${status.count}" type="radio" />${entry.key}.${entry.value}
    </c:forEach>

    <br/><br/>
</c:forEach>

Generated HTML source code:

Rendering:

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template