반응형
화면 호출시 창크기 설정 & 브라우저 사이즈 조절시 크기변경 (js파일에 설정 후 여러 jsp에 적용하여 사용)
windowCtl.js
$(document).ready(function() {
var _width = $(window).width();
if(0 != _width) {
$('body').css('height', $(window).height() - 24);
$('#contents').css('width', $(window).width() - 32);
$('#iframeEx').css('height', $(window).height() - 100);
$(window).resize(function() { //창크기를 늘이거나 줄일경우도 포함해줘야만 한다.
$('body').css('height', $(window).height() - 24);
$('#contents').css('width', $(window).width() - 32);
$('#iframeEx').css('height', $(window).height() - 100);
});
}
});
jswindowCtlEc.jsp
<body topmargin="0" leftmargin="0" >
<div id="contents">
<div id="rexView">
<iframe name="iframeEx" id="iframeEx" src="${ServerURL}/serverPreview.jsp"
style="background-color:#ffffff" width="100%" frameborder="0" scrolling="auto"></iframe>
</div>
</div>
</body>
반응형
'JSP > JSP' 카테고리의 다른 글
[JSP] log출력 (0) | 2019.11.07 |
---|---|
[JSP] 전체 체크박스 설정 (0) | 2019.11.07 |
[JSP] selectbox option disabled (0) | 2019.11.06 |
[JSP] 연월 계산 (0) | 2019.11.06 |
[JSP] replace매서드 - String에 위치한 모든문자 변경 (0) | 2019.11.06 |