<select class="form-control" id="personselect" name="personselect"> <option value="" disabled selected>担当者を選択して下さい</option> <span th:each="organization : ${organizations}"> <option id="personoption" data-th-if="${organization.id eq 2}" th:value=${member.id} th:each="member : ${organization.members}" th:text="${member.lastname} + ' ' + ${member.firstname}"></option> </span> </select>
Thymeleafを使用して、上記のようなselectboxを作っています。
data-th-if="${organization.id eq 2}"
の 「2」の部分をJavascriptで宣言した変数に置き換えたいの思っているのですが、可能でしょうか?
いくら調べても答えが見つからなかったので、ご教示頂けますと幸いです。
回答1件
あなたの回答
tips
プレビュー