728x90
반응형
@
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
|
<form id="listForm" name="listForm" method="post">
<input type="text" name="searchTargetDivCd" id="searchTargetDivCd" value="${eduPlanMVo.searchTargetDivCd}" />
<input type="text" name="searchTargetDivCdArrayRd" id="searchTargetDivCdArrayRd" size="200px;" value="${eduPlanMVo.searchTargetDivCdArrayRd}" />
<c:forEach items="${targetDivCoeList}" var="targetDivCodeList" varStatus="status">
<input type="checkbox" name="targetDivCodeList" id="targetDivCodeList" value="${targetDivCodeList.classCd}" />${targetDivCodeList.className}
</c:forEach>
</form>
<script type="text/javascript">
$(document).ready(function(e){
$(document)
.on("change", "#searchCompanyId", function(e) {
$("#pageIndex").val("1");
var tmpTypeCds = "";
$("input:checkbox[name='targetDivCodeList']").each(function() {
if (this.checked) {
tmpTypeCds += this.value + ",";
}
});
tmpTypeCds = tmpTypeCds.substring(0, tmpTypeCds.lastIndexOf(','));
$("#searchTargetDivCd").val(tmpTypeCds);
$("#frm").attr("action", "<c:url value='/testList.do'/>");
$("#frm").submit();
})
});
</script>
|
cs |
@
String searchTargetDivCdArrayRd = request.getParameter(" searchTargetDivCdArrayRd "); // 화면에서 Array
String[] searchTargetDivCdArray = searchTargetDivCdArrayRd.split(","); // 화면에서 Array ibatis값
<iterate property=" searchTargetDivCdArray" open="(" close=")" conjunction=",">
#searchTargetDivCdArray[]#
</iterate>
728x90
반응형