나는필자의 경우 iframe 콘텐츠 높이를 설정하는 방법은 무엇입니까?
$scope.init = function(id) {
console.log($('#'+ id)) -> show my iframe
var x= $('#'+ id)..contentWindow.document.body.scrollHeight;
console.log(x) -> gives me undefined
var y = $('#'+ id)..contentWindow;
console.log(y) -> give me undefined too
}
가 어떻게 내 컨트롤러를 통해 iframe이 콘텐츠 높이를 설정하는 내 컨트롤러에
<iframe id='iframe' width='100%' height='600px' data-ng-init="init('iframe')"
src='http://test.com' />
같은 뭔가를
각
를 통해 설정에 iframe이 콘텐츠 높이를 노력하고 있어요?감사합니다. 코드에서
'100 %'에 iframe이 높이를 설정하고 당신이 어떤 평소에 따라 제어 부모 DIV에 포장 메서드 (예 : CSS). –
DOM 조작은 지시문 내에서 수행되어야합니다. 예를 들어 http://plnkr.co/edit/KgrhJg7xKQqxm9pho4SH?p=preview – miqid