<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
setTimeout(function(){
alert(3);
},0);
$(window).load(function(){
alert(6);
});
$(function(){
alert(1);
});
$(document).ready(function(){
alert(5);
});
//실행순서
//$(function == $(document).ready -> $(window).load -> settimeout
//alert(2);
</script>
</head>
<body>
<script>
//dom이 열리고 난 뒤 실행
//$(function(){
//alert(1);
//});
//
//alert(2);
//alert(4);
</script>
댓글 없음:
댓글 쓰기