iframe 크기가 동적일경우 스크롤바 안보이게 하기 > script

본문 바로가기
사이트 내 전체검색

script

iframe 크기가 동적일경우 스크롤바 안보이게 하기

페이지 정보

작성자 서방님 댓글 0건 조회 124회 작성일 07-04-24 16:34

본문

<Script language="javascript">
function Resize_Frame(name) {
 try {
  var oBody = document.frames(name).document.body;
  var oFrame = document.all(name);

  oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth-oBody.clientWidth);
  oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight-oBody.clientHeight);
  oFrame.style.width = oBody.scrollWidth + 20;
  oFrame.style.height = oBody.scrollHeight + 20;

  if (oFrame.style.height == "0px" || oFrame.style.width == "0px") {
    oFrame.style.width = "740px";
    oFrame.style.height = "300px";
  }
 } catch(e) {
   window.status = 'Error: ' + e.number + '; ' + e.description;
 }
}
</script>
ifram 내용에 맞게 자동으로 크기 조절
<hr>
<iframe id="test" src="2.htm"></iframe>

댓글목록

등록된 댓글이 없습니다.

Total 846건 44 페이지
게시물 검색

회원로그인

접속자집계

오늘
20
어제
302
최대
1,347
전체
155,081
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.