/* iframe Resizing
익스플로러 6, 넷스케이프 8 이상에서 작동
너비는 적용안되고 높이만 자동 리사이즈
Ex)
<iframe src="주소" width="640" marginwidth="0" marginheight="0" frameborder="0" onLoad="ResizeIFrame(this);"></iframe>
*/
function resizeIFrame(iframeId)
{
try {
var innerBody = iframeId.contentWindow.document.body;
var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
if(iframeId.style.height != innerHeight) {
iframeId.style.height = innerHeight;
}
if(document.all) {
innerBody.attachEvent('onclick',parent.do_resize);
innerBody.attachEvent('onkeyup',parent.do_resize);
}
else {
innerBody.addEventListener("click", parent.do_resize, false);
innerBody.addEventListener("keyup", parent.do_resize, false);
}
}
catch (e) {
}
}
익스플로러 6, 넷스케이프 8 이상에서 작동
너비는 적용안되고 높이만 자동 리사이즈
Ex)
<iframe src="주소" width="640" marginwidth="0" marginheight="0" frameborder="0" onLoad="ResizeIFrame(this);"></iframe>
*/
function resizeIFrame(iframeId)
{
try {
var innerBody = iframeId.contentWindow.document.body;
var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
if(iframeId.style.height != innerHeight) {
iframeId.style.height = innerHeight;
}
if(document.all) {
innerBody.attachEvent('onclick',parent.do_resize);
innerBody.attachEvent('onkeyup',parent.do_resize);
}
else {
innerBody.addEventListener("click", parent.do_resize, false);
innerBody.addEventListener("keyup", parent.do_resize, false);
}
}
catch (e) {
}
}
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
댓글 3개
16년 전
이렇게 하여도 됩니다.
<!-- 아이프레임 창 높이 조절 시작 -->
<script language="JavaScript">
<!--
function calcHeight() {
//find the height of the internal page
var the_height=
document.getElementById('iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('iframe').height=
the_height;
}
//-->
</script>
<!-- 아이프레임 창 높이 조절 끝 -->
여기까지를 <head>와 </head>사이에 넣으시고
게시판을 삽입하는 곳에는
<!--- 게시판 삽입 시작 -->
<?
echo "<iframe id=iframe onLoad=\"calcHeight();\" src=\"여기에 게시판 주소를 넣으세요\" scrolling=no frameborder=0 width=1000 height=0></iframe>";
?>
<!--- 게시판 삽입 --->
<!-- 아이프레임 창 높이 조절 시작 -->
<script language="JavaScript">
<!--
function calcHeight() {
//find the height of the internal page
var the_height=
document.getElementById('iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('iframe').height=
the_height;
}
//-->
</script>
<!-- 아이프레임 창 높이 조절 끝 -->
여기까지를 <head>와 </head>사이에 넣으시고
게시판을 삽입하는 곳에는
<!--- 게시판 삽입 시작 -->
<?
echo "<iframe id=iframe onLoad=\"calcHeight();\" src=\"여기에 게시판 주소를 넣으세요\" scrolling=no frameborder=0 width=1000 height=0></iframe>";
?>
<!--- 게시판 삽입 --->
16년 전
지마켓 등에서 상품 등록시 아이프레임을 사용하려고 하는데, 높이 조절이 자동으로 안되네요..
15년 전
다른 서버의 웹문서에도 가능한가요???
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 10년 전 | 457 | ||
| 7829 |
|
10년 전 | 641 | |
| 7828 | 10년 전 | 567 | ||
| 7827 | 10년 전 | 467 | ||
| 7826 | 10년 전 | 494 | ||
| 7825 | 10년 전 | 518 | ||
| 7824 | 10년 전 | 483 | ||
| 7823 | 10년 전 | 426 | ||
| 7822 | 10년 전 | 399 | ||
| 7821 | 10년 전 | 346 | ||
| 7820 | 10년 전 | 367 | ||
| 7819 |
|
10년 전 | 766 | |
| 7818 | 10년 전 | 423 | ||
| 7817 | 10년 전 | 601 | ||
| 7816 | 10년 전 | 439 | ||
| 7815 | 10년 전 | 635 | ||
| 7814 | 10년 전 | 474 | ||
| 7813 | 10년 전 | 433 | ||
| 7812 | 10년 전 | 438 | ||
| 7811 | 10년 전 | 417 | ||
| 7810 | 10년 전 | 615 | ||
| 7809 | 10년 전 | 550 | ||
| 7808 | 10년 전 | 429 | ||
| 7807 | 10년 전 | 440 | ||
| 7806 |
프로그래머7
|
10년 전 | 1362 | |
| 7805 | 10년 전 | 1304 | ||
| 7804 |
zahir1312
|
10년 전 | 802 | |
| 7803 |
|
10년 전 | 1403 | |
| 7802 | 10년 전 | 504 | ||
| 7801 | 10년 전 | 882 | ||
| 7800 | 10년 전 | 1109 | ||
| 7799 | 10년 전 | 591 | ||
| 7798 | 10년 전 | 540 | ||
| 7797 | 10년 전 | 560 | ||
| 7796 | 10년 전 | 394 | ||
| 7795 | 10년 전 | 547 | ||
| 7794 | 10년 전 | 587 | ||
| 7793 | 10년 전 | 1087 | ||
| 7792 | 10년 전 | 509 | ||
| 7791 | 10년 전 | 602 | ||
| 7790 | 10년 전 | 530 | ||
| 7789 |
fbastore
|
10년 전 | 1481 | |
| 7788 | 10년 전 | 584 | ||
| 7787 | 10년 전 | 444 | ||
| 7786 | 10년 전 | 653 | ||
| 7785 | 10년 전 | 623 | ||
| 7784 | 10년 전 | 684 | ||
| 7783 | 10년 전 | 506 | ||
| 7782 | 10년 전 | 529 | ||
| 7781 | 10년 전 | 936 | ||
| 7780 | 10년 전 | 846 | ||
| 7779 | 10년 전 | 798 | ||
| 7778 | 10년 전 | 387 | ||
| 7777 | 10년 전 | 499 | ||
| 7776 | 10년 전 | 496 | ||
| 7775 | 10년 전 | 435 | ||
| 7774 | 10년 전 | 647 | ||
| 7773 | 10년 전 | 401 | ||
| 7772 | 10년 전 | 772 | ||
| 7771 | 10년 전 | 429 | ||
| 7770 | 10년 전 | 672 | ||
| 7769 | 10년 전 | 432 | ||
| 7768 | 10년 전 | 652 | ||
| 7767 | 10년 전 | 1206 | ||
| 7766 | 10년 전 | 533 | ||
| 7765 | 10년 전 | 589 | ||
| 7764 |
잘살아보자
|
10년 전 | 450 | |
| 7763 |
|
10년 전 | 1500 | |
| 7762 |
Tosea
|
10년 전 | 1087 | |
| 7761 | 10년 전 | 687 | ||
| 7760 |
잘살아보자
|
10년 전 | 759 | |
| 7759 |
잘살아보자
|
10년 전 | 597 | |
| 7758 |
잘살아보자
|
10년 전 | 656 | |
| 7757 | 10년 전 | 1278 | ||
| 7756 |
ITBANK
|
10년 전 | 1288 | |
| 7755 | 10년 전 | 1944 | ||
| 7754 | 10년 전 | 1101 | ||
| 7753 | 10년 전 | 919 | ||
| 7752 | 10년 전 | 1419 | ||
| 7751 |
잘살아보자
|
10년 전 | 579 | |
| 7750 |
잘살아보자
|
10년 전 | 505 | |
| 7749 |
잘살아보자
|
10년 전 | 529 | |
| 7748 |
잘살아보자
|
10년 전 | 558 | |
| 7747 |
잘살아보자
|
10년 전 | 635 | |
| 7746 |
잘살아보자
|
10년 전 | 697 | |
| 7745 |
잘살아보자
|
10년 전 | 944 | |
| 7744 |
잘살아보자
|
10년 전 | 440 | |
| 7743 | 10년 전 | 967 | ||
| 7742 |
starbros
|
10년 전 | 863 | |
| 7741 |
잘살아보자
|
10년 전 | 705 | |
| 7740 |
잘살아보자
|
10년 전 | 592 | |
| 7739 |
잘살아보자
|
10년 전 | 487 | |
| 7738 |
잘살아보자
|
10년 전 | 561 | |
| 7737 |
잘살아보자
|
10년 전 | 541 | |
| 7736 |
잘살아보자
|
10년 전 | 561 | |
| 7735 |
잘살아보자
|
10년 전 | 895 | |
| 7734 |
잘살아보자
|
10년 전 | 453 | |
| 7733 |
잘살아보자
|
10년 전 | 564 | |
| 7732 |
잘살아보자
|
10년 전 | 729 | |
| 7731 |
잘살아보자
|
10년 전 | 653 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기