티스토리 뷰

html
<div class="checkbox">
<label th:each="paymentType : ${paymentMethodCodeList}">
<input type="checkbox" th:id="|chkPayment_${paymentType.codeID}|" th:name="chkPaymentList" th:value="${paymentType.codeID}" /><span th:text="${paymentType.codeName}" />
</label>
</div>

// javascript 데이터 insert시
requestObj.multiPaymentCode = $("input:checkbox[name=chkPaymentList]:checked").map(function(){ return $(this).val();}).get().join(",");

// javascript 데이터 조회시
$.each(dtl.multiPaymentCode.split(','), function(index, codeID){ $("#chkPayment_" + codeID).attr("checked", true); });

'Skill > html js css' 카테고리의 다른 글

bootstrap 이벤트  (0) 2024.12.17
jquery 모음  (0) 2024.12.17
DataTable tr click시  (0) 2024.10.31
js 숫자입력점검(계좌번호)  (0) 2024.10.14
input-mask  (0) 2024.08.28
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함