[View] SELECT문 비교

sungeun·2022년 10월 13일
0
post-thumbnail
[ JSTL ]
<form:select path="courseCd" title="종목을 선택해주세요.">
    <option value="">선택하세요</option>
    <c:forEach var="code" items="${codeMap.values()}">
        <form:option value="${code.code_cd}">
            <c:out value="${code.code_nm}"/>
        </form:option>
    </c:forEach>
</form:select>
[ Thymeleaf ]
<select th:field="*{courseCd}" title="종목을 선택해주세요.">
    <option th:each="code : ${codeMap.values()}"
            th:value="${code.code_cd}"
            th:text="${code.code_nm}"
    >선택</option>
</select>
profile
Back-end Developer

0개의 댓글