logo
  • 教程列表
  • SO官方文檔
  • 使用帶有 Thymeleaf 的列表
    • 在 select 中使用 list
    • 表格表格
  1. StackOverflow 文件
  2. thymeleaf 教程
  3. 使用帶有 Thymeleaf 的列表
  4. 在 select 中使用 list

在 select 中使用 list

Created: November-22, 2018

你可以使用列表變數來形成 <select> 元素

 <select th:field="*{countries}">
     <option th:each="country: ${countries}"
             th:value="${country.id}"
             th:text="#{${'selected.label.' + country.name}}"/>
</select>
  • 表格表格
  • 使用帶有 Thymeleaf 的列表

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明