<s:select name="years" id="years" list="#{1:'2012',2:'2013',3:'2014',4:'2015'}" listKey="key" listValue="value" headerKey="-1" headerValue="==請選擇==">
</s:select>
然後在Action設置String years屬性,並在方法裏設置years的值即可
<s:select name="years" id="years" list="#{1:'2012',2:'2013',3:'2014',4:'2015'}" listKey="key" listValue="value" headerKey="-1" headerValue="==請選擇==">
</s:select>
然後在Action設置String years屬性,並在方法裏設置years的值即可
(1)struts2的輸入驗證 —基於Xwork Validation Framework的聲明式驗證,需要聲明的內容包括 ~~對哪個Action或Model的哪個字段進行驗證; ~~使用什麼