반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
Tags
- paragraph
- C언어
- web 개발
- html
- web 사진
- 머신러닝
- pycharm
- 결합전문기관
- cudnn
- tensorflow
- 웹 용어
- postorder
- CES 2O21 참여
- discrete_scatter
- inorder
- vscode
- web
- broscoding
- 대이터
- mglearn
- KNeighborsClassifier
- classification
- CES 2O21 참가
- 자료구조
- 재귀함수
- web 용어
- bccard
- 데이터전문기관
- java역사
- Keras
Archives
- Today
- Total
bro's coding
window load와 jquery document ready의 차이점 본문
반응형
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Insert title here</title>
</head>
<script type="text/javascript">
window.onload = function() {
/*
window load와 jquery document ready의 차이점
> window load: img, 동영상과 같은 요소들이 모두 load된 후 호출
> document ready: DOM이 load되는 시점에 호출
(이미지나 동영상 같은 자원들이 로드되지 않아도 document 객체가 준비되면 실행)
jquery document ready가 되는 시점에 익명함수 내에 현 페이질에서 동작될 이벤트에 대한 동작을 바인딩(등록)
*/
alert("window onload");
}
/*
jQuery(document).ready(function() {
alert("jQuery document ready");
})*/
$(document).ready(function() {
// 현 페이지에서 이벤트가 발생되면 동작할 행위를 모두 바인딩시킨다
})
</script>
<body>
jQuery Basic
<ul>
<li><a href="#">test1</a></li>
<li><a href="#">test2</a></li>
<li><a href="#">test3</a></li>
</ul>
</body>
</html>
반응형
Comments