站内搜索:
首页 >> 前端 >> 内容
el表达式怎么加foreach?

时间:2018/3/6 15:51:11

el表达式怎么加foreach?

//下拉框(符合条件就选中)  
<c:forEach items="${psy_certificaten}" var="tt">  
    <option value="${tt}" ${tt eq ext_school_psy.psy_certificaten?'selected':''}>${tt}</option>  
</c:forEach>  
默认选中  
  <option value="1" <c:if test="${user.married eq '1'}"> selected="selected"</c:if>>已婚</option>  
//勾选  
<input type="radio"  name="user_gender" value="0"<c:if test="${user.user_gender eq '0'}"> checked="checked"</c:if>> 
//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>  

  • 上一篇:promise实现公共弹框组件(异步回调)的代码教程
  • 下一篇:移动端优化实例教程
  • 返回顶部