s:select標籤簡單使用

<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的值即可



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章