<select name="upgtype" style="border:1px solid #939393;width:200px;height:30px;" >
<option th:each="li:${types}" th:value="${li.tid}" th:text="${li.tname}" th:selected="${li.tid eq nowtid}" >類型</option>
</select>
注意!!!!th:selected="${li.tid eq nowtid}"中比較的類型一定要一樣,嗚嗚嗚,找了好久的錯誤,一直沒反應,原來問題出在這。