자바/JAVA...Spring
${} 함수의 다른 사용법
행복한짱짱이
2016. 1. 11. 14:39
- 엘리먼트나 엘리먼트의 어레이를 $() 함수로 전달하면 window 객체 같은 것에 jQuery 함수를 적용하는 것이 가능하다. 일반적으로 이 함수를 다음과 같이 로드 이벤트에 할당한다.
window.onload = function() {
// do this stuff when the page is done loading
};
jQuery를 사용하면, 같은 코드도 다음과 같이 된다.
$(window).load(function() {
// run this when the whole page has been downloaded
});