在html中动态创建列表框

时间:2013-09-17 09:03:28

标签: html listbox thymeleaf

我想创建一些列表框。但是我想创建的列表框的数量是动态的(我只会在运行时知道我需要多少个列表框),那么我该如何为它编码呢?

1 个答案:

答案 0 :(得分:1)

因为Thymeleaf th:each中的每个循环都是你的朋友。所以也许你需要一个额外的div-Tag

<div th:remove="tag" th:each= ...> </div>