beetl模板引擎中for循环以及select设置默认值的判断

<#select id="salesOfficesId" name="售楼处" >
       @for(offices in officesList){
              <option value="${offices.id}" ${offices.id == building.salesOfficesId?'selected': ''}>${offices.name}</option>
       @}
</#select>

猜你喜欢

转载自blog.csdn.net/tianshuhao521/article/details/85754253