el表达式怎么加foreach

1

2

3

4

//下拉框(符合条件就选中) 

<c:forEach items="${psy_certificaten}" var="tt"

    <option value="${tt}" ${tt eq ext_school_psy.psy_certificaten?'selected':''}>${tt}</option> 

</c:forEach>

1

2

默认选中 

  <option value="1" <c:if test="${user.married eq '1'}"> selected="selected"</c:if>>已婚</option>

1

2

//勾选 

<input type="radio"  name="user_gender" value="0"<c:if test="${user.user_gender eq '0'}"> checked="checked"</c:if>>

1

2

3

4

5

6

7

8

//for循环嵌套(列出所有,符合条件就勾选) 

<c:forEach items="${good_at}" var="tt">                

     <input id="good_at_show" type="checkbox" value="${tt}" name="good_at_show" style="width: 3%;margin-top: 1%" 

            <c:forEach items="${user_good_at}" var="aa"

                <c:if test="${aa eq tt}"> checked="checked"</c:if

            /c:forEach>   

         >${tt}                   

</c:forEach>

猜你喜欢

转载自blog.csdn.net/u012045045/article/details/84303155