웹 페이지 실행순서
<script>
alert("hello"); =======================1
$(function(){
alert("hello"); =======================3
getTopVersionList('<%=param.getString("MANUAL_NO")%>'); =======================4
});
function getTopVersionList{
$.each(data.records, function(index, rd) {
$("input:checkbox[id='VERSION" + rd.VERSION + "']").prop("checked", true);
})
}
</script>
<%if( !(dc == null || dc.isError()) ) { =======================2
for(int i=0; i<dc2.size(); i++) {
rd = dc2.getRecord(i);
%>
<span class="cursor">
<input type="checkbox" id="VERSION<%=rd.getString("VERSION") %>" value="<%=rd.getString("VERSION") %>" name="VERSION">
<label for="VERSION<%=rd.getString("VERSION") %>" class="cursor" ><%=rd.getString("VERSION") %></label>
</span>
<% } %>
1. https://docu94.tistory.com/37
2. https://www.w3schools.com/js/js_htmldom.asp
3. https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=dssh87&logNo=222023739537
4. https://nancording.tistory.com/30