//list集合绑定到select上
<td align="right">分站点:
<span style="color: red; font-weight: bold;"> * </span></td>
<td align="left" width="15%">
<select name="siteName" id="siteName" hasEmpty="true">
<option value="">请选择</option>
<c:forEach var="site" items="${siteList}">
<option value="${site.siteCode}">${site.siteName}</option>
</c:forEach>>
</select>
<input type="hidden" id="siteCode" name="siteCode" class="siteCode">
</td>
//数据字典的数据绑定到select上
//B2B_CHANNEL_TYPE是添加到数据字典里面的type属性
//name是要提交的数据,这里取到的是数据字典里的code
<td align="right">频道:
<span style="color: red; font-weight: bold;"> * </span></td>
<td align="left" width="15%">
<input type="hidden" id="channelName" name="channelName"" class="channelName"">
<tbsp:dict id="channelCode" name="channelCode" display="select" dictType="B2B_CHANNEL_TYPE" hasEmpty="true" />
</td>
select的灵活使用
最新推荐文章于 2019-12-23 16:38:56 发布