<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js">
</script>
<iframe class="resize" src="/" frameborder="0" scrolling="no"></iframe>
<script type="text/javascript">
$(function(){
$("iframe.resize").load(function(){
var frame = $(this).get(0);
var doc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
$(this).height(doc.body.scrollHeight);
//$(this).width(doc.body.scrollWidth); // 너비도 자동적용하려면 주석 제거
});
});
</script>
</script>
<iframe class="resize" src="/" frameborder="0" scrolling="no"></iframe>
<script type="text/javascript">
$(function(){
$("iframe.resize").load(function(){
var frame = $(this).get(0);
var doc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
$(this).height(doc.body.scrollHeight);
//$(this).width(doc.body.scrollWidth); // 너비도 자동적용하려면 주석 제거
});
});
</script>
[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
댓글 4개
16년 전
한때 이 것 때문에 무진장 고생했었는데
잘 되나요?
브라우저 호환은 문제없나요? ^^;
함 해봐야겠네요 ㅎㅎ 암튼 감사합니다.
잘 되나요?
브라우저 호환은 문제없나요? ^^;
함 해봐야겠네요 ㅎㅎ 암튼 감사합니다.
태양의서쪽
16년 전
// 약간 문제가 있어서 수정 했습니다.
// height 속성이 없는 iframe에 대해서만 높이 자동 지정
// jquery.livequery.js 사용
$.iresize = function() {
try {
$("iframe[height=]")
.livequery("load", function() {
var doc = $(this).contents().find($.browser.msie ? 'body#' : 'body');
$(this).height(doc.height());
});
} catch (e) {}
}
$.iresize();
// height 속성이 없는 iframe에 대해서만 높이 자동 지정
// jquery.livequery.js 사용
$.iresize = function() {
try {
$("iframe[height=]")
.livequery("load", function() {
var doc = $(this).contents().find($.browser.msie ? 'body#' : 'body');
$(this).height(doc.height());
});
} catch (e) {}
}
$.iresize();
RINIX
16년 전
이렇게 하면 페이지 네이 있는 iframe 전체가 다 수정되는거 아닌가요?
name 과 options 를 지정 하심이..^^
가로와 세로를 선택적으로 사용가능하게말이죠..^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$.iresize = function(name, options) {
var settings = {width:true, height:true}
$.extend(settings, options);
try {
$(name)
.livequery("load", function() {
var doc = $(this).contents().find($.browser.msie ? 'body#' : 'body');
if(settings.width) $(this).width(doc.width());
if(settings.height) $(this).height(doc.height());
});
} catch (e) {}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$.iresize("element",{width:false}); // height 만 맞춤
$.iresize("element",{height:false}); // width 만 맞춤
$.iresize("element"); // 둘다 맞춤
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
이런식이 된다면 이렇게 하는것이 좋을듯 해 보입니다..^^
name 과 options 를 지정 하심이..^^
가로와 세로를 선택적으로 사용가능하게말이죠..^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$.iresize = function(name, options) {
var settings = {width:true, height:true}
$.extend(settings, options);
try {
$(name)
.livequery("load", function() {
var doc = $(this).contents().find($.browser.msie ? 'body#' : 'body');
if(settings.width) $(this).width(doc.width());
if(settings.height) $(this).height(doc.height());
});
} catch (e) {}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$.iresize("element",{width:false}); // height 만 맞춤
$.iresize("element",{height:false}); // width 만 맞춤
$.iresize("element"); // 둘다 맞춤
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
이런식이 된다면 이렇게 하는것이 좋을듯 해 보입니다..^^
16년 전
ifrmae - > iframe 이 맞죠 .?
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2730 | 15년 전 | 651 | ||
| 2729 | 15년 전 | 1397 | ||
| 2728 |
|
15년 전 | 930 | |
| 2727 |
용다섯마리
|
15년 전 | 687 | |
| 2726 |
니콜크더만
|
15년 전 | 772 | |
| 2725 |
Insungbyun
|
15년 전 | 833 | |
| 2724 | 15년 전 | 1226 | ||
| 2723 | 15년 전 | 724 | ||
| 2722 | 15년 전 | 735 | ||
| 2721 | 15년 전 | 949 | ||
| 2720 | 15년 전 | 682 | ||
| 2719 |
|
15년 전 | 1426 | |
| 2718 | 15년 전 | 1051 | ||
| 2717 |
디이자이너
|
15년 전 | 2869 | |
| 2716 |
|
15년 전 | 1362 | |
| 2715 | 15년 전 | 650 | ||
| 2714 |
고추장불고기
|
15년 전 | 621 | |
| 2713 | 15년 전 | 786 | ||
| 2712 | 15년 전 | 1259 | ||
| 2711 | 15년 전 | 1187 | ||
| 2710 | 15년 전 | 668 | ||
| 2709 | 15년 전 | 792 | ||
| 2708 |
TWM소프트
|
15년 전 | 980 | |
| 2707 |
|
15년 전 | 1213 | |
| 2706 |
|
15년 전 | 1015 | |
| 2705 | 15년 전 | 995 | ||
| 2704 | 15년 전 | 1188 | ||
| 2703 |
|
15년 전 | 666 | |
| 2702 |
|
15년 전 | 650 | |
| 2701 | 15년 전 | 1056 | ||
| 2700 | 15년 전 | 644 | ||
| 2699 | 15년 전 | 1743 | ||
| 2698 | 15년 전 | 2249 | ||
| 2697 |
|
15년 전 | 817 | |
| 2696 | 15년 전 | 816 | ||
| 2695 | 15년 전 | 1479 | ||
| 2694 |
|
15년 전 | 882 | |
| 2693 | 15년 전 | 977 | ||
| 2692 | 15년 전 | 1386 | ||
| 2691 |
Homepix
|
15년 전 | 1546 | |
| 2690 | 15년 전 | 1649 | ||
| 2689 | 15년 전 | 1089 | ||
| 2688 |
sooram
|
15년 전 | 1757 | |
| 2687 |
terrorboys
|
15년 전 | 1569 | |
| 2686 |
진정한승리
|
15년 전 | 801 | |
| 2685 |
|
15년 전 | 1789 | |
| 2684 |
진정한승리
|
15년 전 | 922 | |
| 2683 |
dannykim
|
15년 전 | 776 | |
| 2682 | 15년 전 | 826 | ||
| 2681 | 15년 전 | 776 | ||
| 2680 | 15년 전 | 944 | ||
| 2679 | 15년 전 | 961 | ||
| 2678 | 15년 전 | 1173 | ||
| 2677 |
|
15년 전 | 3185 | |
| 2676 | 15년 전 | 1755 | ||
| 2675 | 15년 전 | 897 | ||
| 2674 | 15년 전 | 1596 | ||
| 2673 | 15년 전 | 764 | ||
| 2672 | 15년 전 | 903 | ||
| 2671 |
다케미카코
|
15년 전 | 1861 | |
| 2670 | 15년 전 | 1813 | ||
| 2669 | 15년 전 | 853 | ||
| 2668 |
terrorboys
|
15년 전 | 1113 | |
| 2667 | 15년 전 | 1069 | ||
| 2666 | 15년 전 | 1034 | ||
| 2665 | 15년 전 | 1221 | ||
| 2664 | 15년 전 | 951 | ||
| 2663 | 15년 전 | 977 | ||
| 2662 | 15년 전 | 900 | ||
| 2661 | 15년 전 | 1029 | ||
| 2660 | 15년 전 | 945 | ||
| 2659 | 15년 전 | 1542 | ||
| 2658 | 15년 전 | 782 | ||
| 2657 | 15년 전 | 750 | ||
| 2656 | 15년 전 | 1387 | ||
| 2655 | 15년 전 | 1289 | ||
| 2654 | 15년 전 | 1233 | ||
| 2653 | 15년 전 | 803 | ||
| 2652 | 15년 전 | 1593 | ||
| 2651 | 15년 전 | 977 | ||
| 2650 | 15년 전 | 1629 | ||
| 2649 |
windday
|
15년 전 | 1983 | |
| 2648 | 15년 전 | 1410 | ||
| 2647 | 15년 전 | 7606 | ||
| 2646 | 15년 전 | 1036 | ||
| 2645 | 15년 전 | 1256 | ||
| 2644 | 15년 전 | 982 | ||
| 2643 | 15년 전 | 1199 | ||
| 2642 | 15년 전 | 976 | ||
| 2641 | 15년 전 | 1191 | ||
| 2640 |
프리랜서개발자
|
15년 전 | 922 | |
| 2639 | 15년 전 | 2012 | ||
| 2638 | 15년 전 | 1025 | ||
| 2637 | 15년 전 | 931 | ||
| 2636 | 15년 전 | 1421 | ||
| 2635 | 15년 전 | 1314 | ||
| 2634 | 15년 전 | 1040 | ||
| 2633 | 15년 전 | 916 | ||
| 2632 | 15년 전 | 951 | ||
| 2631 | 15년 전 | 1232 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기