list页面查询input选择框
<div class="col-xs-2">
<div class="form-group">
<select name="agmTypeId" class="input-sm form-control">
<option value="">请选择农机类型</option>
<c:forEach items="${atlist}" var="role">
<option value="${role.id}">${role.name}</option>
</c:forEach>
</select>
</div>
</div>
show页面展示
<div class="layui-form-item">
<label class="layui-form-label">信息类别</label>
<div class="layui-input-block">
<input type="text" autocomplete="off" name="agmType"
disabled class="layui-input"
<c:if test="${obj.agmType==1}">value="需求" </c:if>
<c:if test="${obj.agmType==2}">value="服务"</c:if>
>
</div>
</div>