javascript 썸네일형 리스트형 apply call apply() 메서드function.apply(thisArg, argArray)기억해야 할 점은 apply() 메서드를 호출하는 주체가 함수이고, apply() 메서드도 this를 특정 객체에 바인딩 할 뿐 결국 본질적인 기능은 함수 호출이라는 점입니다. -> Blog.apply() 이렇게 호출한다면 이것의 기본적인 기능은 Blog() 함수를 호출하는 것입니다. thisArg : 메서드를 호출한 함수 내부에서 사용한 this에 바인딩할 객체(즉, 첫 번째 인자로 넘긴 객체가 this로 명시적으로 바인딩 됩니다.) argArray : 함수를 호출할 때 넘길 인자들의 배열(apply() 메서드의 기능도 결국 함수를 호출하는 것이므로, 함수에 넘길 인자를 argArray 배열로 넘깁니다.) -> 두 번째 인자.. 더보기 image onload image.onload event and browser cache down votefavorite4I want after load image, alert some, but here is 1 problem: as I know, if img is saved in browser cache,img.onload event will be not called. So, how solve this problem, how make alert after every refresh document, despite img saved in browser cache or not, tell please someone.var img = new Image(); img.src = "img.jpg"; img.onload = function .. 더보기 apply, call 상속하기 Javascript는 상속을 위해 call과 apply를 사용함 call은 인자를 전달하고apply는 배열을 전달합니다. ◎call 예제 function Car(price, kilo){ // 자동차 객체 생성 this.nation="Korean"; // 국가는 한국 this.price=price; // 가격은 입력 this.kilo=kilo; // 주행거리는 입력받음 } var tico={ year : 2014 }; // 2014년에 생산된 티코 객체 생성 Car.call(tico, 100000, 10); // 티코는 Car객체를 상속받음 console.log(tico); // 티코 출력 결과tico={ nation:"Korean", price:100000, kilo:10, year:2014} ◎appl.. 더보기 이전 1 2 3 4 다음