Minheight를 결정하고 자바 스크립트를 통해 넣어. 두 번 성공적으로 작동하지만 세 번째 호출에서 동일한 코드가 작동하지 않습니다. 이 하나 (document.getElementById ("rightadmin"). style.minHeight = wrapHeight + 'px';)가 작동하지 않습니다. 더 놀라운 것은 만약 내가 3 등을 2 순위로 올리면 작동하고 3 순위는 작동하지 않는다는 것입니다. 그래서 기본적으로 제 2 번째 이후에 넣은 것은 작동하지 않습니다.document.getElementById(); 세 번째 시간에 작동하지 않습니다
자바 스크립트 :
function height(){
var dheight= ($(document).height());
var wheight= ($(window).height());
if(dheight>wheight){
var wrapHeight= dheight;
}
else {
var wrapHeight=wheight;
}
document.getElementById("iframeArea").style.minHeight=wrapHeight+'px';
document.getElementById("dailySchedule").style.minHeight=wrapHeight+'px';
document.getElementById("rightadmin").style.minHeight=wrapHeight+'px';
}
HTML :
<body onload="height();">
<!--Start of iframeArea-->
<div class="iframeArea" id="iframeArea">
<div class="btnRight" id="rightadmin">
</div>
<!--End of btnRight-->
</div>
<!--End of iframeArea-->
'dailySchedule'요소가 있습니까? – fcalderan
whe 다시는 dailySchedule입니까? – 11684
완전한 HTML 구조를 제공하시기 바랍니다. – Nishant