$ (window) .width() & $ (window) .height() 또는 $ (document) .width를 사용하여 최대화 모드에서 Jquery 대화 상자를 열면) & $ (문서) .height(). 메인 윈도우에서 약간 벗어납니다. 내 jQuery 코드는 다음과 같습니다최대화 모드 일 때 JQuery 대화 상자가 약간 밖에 나오는 이유
function DisableBackGrd() {
var dlg = $("#divCreateInqGeneral").dialog({ bgiframe: true,
width: $(window).width(),
height: $(window).height(),
modal: true,
resizable: false,
focus: function() { hideScrollBars(); },
open: function() { hideScrollBars(); },
beforeClose: function() { showScrollBars(); }
});
dlg.parent().appendTo(jQuery("form:first"));
}
관련 HTML
<div id="divCreateInqGeneral" style="display: none">
<uc1:CreateInqGeneral ID="Tab1UCCreateInqGeneral" runat="server" />
</div>
너비와 높이를 100 %로하면 어떻게 될까? –
어떻게? 너비 : '100 %', 높이 : '100 %'이 작동하지 않습니다. 예외를 throw합니다. – Tuscan