iframe 자체 적응 높이(xhtml 지원)IE Firefox 호 환

페이지 높이,창 높이,스크롤 바 높이 등 매개 변수 값 document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; document.write("page height is : " + pageHeight + ""); } else { pageHeight = yScroll; document.write("page height is : " + pageHeight + ""); } if(xScroll < windowWidth){ pageWidth = windowWidth; document.write("page width is : " + pageWidth + ""); } else { pageWidth = xScroll; document.write("page width is : " + pageWidth + ""); } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } -->

getPageSize()

페이지 높이,창 높이,스크롤 바 높이 등 매개 변수 값 document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; document.write("page height is : " + pageHeight + ""); } else { pageHeight = yScroll; document.write("page height is : " + pageHeight + ""); } if(xScroll < windowWidth){ pageWidth = windowWidth; document.write("page width is : " + pageWidth + ""); } else { pageWidth = xScroll; document.write("page width is : " + pageWidth + ""); } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } -->

getPageSize()

[Ctrl+A 전체 선택:외부 Js 를 도입 하려 면 페이지 를 새로 고침 해 야 실행 할 수 있 습 니 다.]

좋은 웹페이지 즐겨찾기