iframe에서 부모창 document에 접근하기 $('body', window.parent.document); iframe에서 부모창의 DOM Tree를 접근하려면 위처럼 셀럭터 다음에 window.parent.document를 작성해주면 된다.여기서 셀럭터 'body' 다음에 오는 것, 즉, second parameter는 selector를 찾는 위치를 말해준다.$( 'selector' , location ); 반대로 부모창에서 iframe Dom Tree에 접근하려면 다음처럼 하면 된다. $('#iframe').contents().find('.elementInIframe').html(); 더보기 이전 1 ··· 10 11 12 13 14 15 16 ··· 79 다음