【发布时间】:2015-06-01 17:39:01
【问题描述】:
我的 thymeleaf 上下文中有一个对象列表 services,我的页面上有以下内容:
<select id="inputService" name="idService" size="1">
<option th:each="service : ${services}" th:text="${service.name}" th:value="${service.idService}"/>
</select>
<p id="selectedServiceLimits"></p>
services 中的每个对象都包含字段 minAmount 和 maxAmount。如何通过javascript将select中选定service的这两个字段打印到我的p元素中?以及如何打印文档准备好时选择的选项的这两个字段?
谢谢!
【问题讨论】:
标签: java javascript jquery html thymeleaf