일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 시작하기
- 강좌
- 스크래치
- jsp
- 파주
- Spring Security
- Android
- 안드로이드
- jobtoy
- 유니티
- html5
- librecad
- 오라클
- 리브레캐드
- 잡토이
- 코딩
- s4a
- tomcat
- MSSQL
- 라즈베리파이
- 톰캣
- 설정
- 설치
- 잡토이 메이킹 코딩 학원
- 예제
- mysql
- 운정
- 아두이노
- oracle
- Unity
Archives
- Today
- Total
랩제이
iframe 사이즈 늘리기(1) 본문
1. parent page
<script type="text/javascript">
function resizeIFrame(name) {
var the_height = document.getElementById(name).contentWindow.document.body.scrollHeight;
document.getElementById(name).height= the_height;
}
</script>
<iframe height="16" width="604" boarder="0" src="iframe.jsp" name="iframeId" id="iframeId" onload="resizeIFrame('iframeId');" ></iframe>
브라우저에 상관없이 parent page에서 height는 정확하게 가져오는데 width는 좀 어렵다.
그래서 width는 <iframe width="xxx"></iframe> 고정한다. 그러면 높이는 자동으로 맞추어준다.
2. child page
그냥 기존대로 ...
'programming > jsp' 카테고리의 다른 글
innerHTML (0) | 2012.03.21 |
---|---|
parent에서 iFrame함수 호출하기 (0) | 2012.03.21 |
뭐니뭐니해도 기본이 최고인거 같다 -- select box 만들기 (0) | 2012.03.21 |
javascript debug (0) | 2012.03.21 |
prototype - Event.observe (0) | 2012.03.21 |