Web/Frontend

웹 페이지 실행순서

콧등치기국수 2022. 6. 29. 13:29

<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

https://defacto-standard.tistory.com/entry/java-jstl-html-javascript-%ED%8E%98%EC%9D%B4%EC%A7%80-%EB%A1%9C%EB%94%A9-%EC%88%9C%EC%84%9C-JSTL%EA%B3%BC-EL-%EA%B0%99%EC%9D%B4-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0

4. https://nancording.tistory.com/30