下拉选择框
一、在页面中固定选项:
<td style="text-align: left;" class="td_bg"> 年份: <select id="year" name="year" > <option value="">--请选择--</option> <option value="2010" ${year eq '2010'?'selected':'' }>2010年</option> <option value="2011" ${year eq '2011'?'selected':'' }>2011年</option> <option value="2012" ${year eq '2012'?'selected':'' }>2012年</option> <option value="2013" ${year eq '2013'?'selected':'' }>2013年</option> <option value="2014" ${year eq '2014'?'selected':'' }>2014年</option> <option value="2015" ${year eq '2015'?'selected':'' }>2015年</option> </select>
二、通过后台查询出选项集:
<td style="text-align: left;" class="td_bg">
指标: <select id="evaluate" name="evaluate"> <option value='-1'>--请选择--</option> <c:forEach var="tPzEvaluate" items="${tPzEvaluateList}"> <option value="${tPzEvaluate.id}"> ${tPzEvaluate.evaname} </option> </c:forEach> </select>
<td class="righttd" width="35%" height="23" style="text-align: right;"> 指标年份: </td> <td class="td_bg" align="left"> <s:select list="#request.yearSels" listKey="param1" listValue="name" headerKey="-1" headerValue="--请选择--" name="year" id="year"></s:select> </td>