아이프레임 리사이즈
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/JavaScript">
$(document).ready(function(e) {
$('#ifrm').load(function() {
$(this).height($(this).contents().find('body')[0].scrollHeight+30+"px");
// $(this).width($(this).contents().find('body')[0].scrollWidth+"px");
});
});
</script>
<iframe id="ifrm" width="100%" frameborder="0" marginwidth="0" scrolling="no" src="블러올 주소"></iframe>
이제까지 해본것중 제일 작동을 잘 하네요..
<script type="text/JavaScript">
$(document).ready(function(e) {
$('#ifrm').load(function() {
$(this).height($(this).contents().find('body')[0].scrollHeight+30+"px");
// $(this).width($(this).contents().find('body')[0].scrollWidth+"px");
});
});
</script>
<iframe id="ifrm" width="100%" frameborder="0" marginwidth="0" scrolling="no" src="블러올 주소"></iframe>
이제까지 해본것중 제일 작동을 잘 하네요..
댓글 11개
10년 전
좋은 자료 감사합니다!!!
10년 전
http://davidjbradshaw.github.io/iframe-resizer/
10년 전
블러올 주소에 네이버 블로그주소를 넣으니깐 적용이 안돼내요;;;
그리고 위에 제이쿼리 주소는 그누보드5에서 제공하는 제이쿼리 js 도 있는데 둘다 써야 하는건가요?
그리고 위에 제이쿼리 주소는 그누보드5에서 제공하는 제이쿼리 js 도 있는데 둘다 써야 하는건가요?
10년 전
크로스 도메인이라 스크립트가 적용이 안됩니다.
10년 전
ㅌ
10년 전
아래는 모바일에서 잘되는 아이프래임입니다
<script>
// 적용할 IFRAME의 이름
var strName = "ifrm";
function getReSize()
{
try {
var objFrame = document.getElementById(strName);
var objBody = ifrm.document.body;
ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
if (ifrmHeight > 300) {
objFrame.style.height = ifrmHeight + "px";
} else {
objFrame.style.height = 300;
}
objFrame.style.width = '100%'
} catch(e) {}
}
function getRetry()
{
getReSize();
setTimeout('getRetry()',500);
}
getRetry();
</script>
<iframe src="본인도메인
" frameborder="0" width="100%" height="768" allowTransparency="true"
name="ifrm" id="auto_iframe" marginwidth="0" marginheight="0" scrolling="no"
allowtransparency="true"></iframe>
<script>
// 적용할 IFRAME의 이름
var strName = "ifrm";
function getReSize()
{
try {
var objFrame = document.getElementById(strName);
var objBody = ifrm.document.body;
ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
if (ifrmHeight > 300) {
objFrame.style.height = ifrmHeight + "px";
} else {
objFrame.style.height = 300;
}
objFrame.style.width = '100%'
} catch(e) {}
}
function getRetry()
{
getReSize();
setTimeout('getRetry()',500);
}
getRetry();
</script>
<iframe src="본인도메인
" frameborder="0" width="100%" height="768" allowTransparency="true"
name="ifrm" id="auto_iframe" marginwidth="0" marginheight="0" scrolling="no"
allowtransparency="true"></iframe>
7년 전
감사합니다. 한참을 헤메다 여기서 찾았네요~
allnight123
10년 전
감사해요
openwater
9년 전
감사합니다
junny
8년 전
잘사용하겠습니다. 감사합니다.
제주도in
7년 전
감사합니다.
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4402 | ||
| 2664 |
선택과집중
|
4개월 전 | 571 | |
| 2663 |
|
4개월 전 | 619 | |
| 2662 |
|
4개월 전 | 574 | |
| 2661 |
선택과집중
|
4개월 전 | 508 | |
| 2660 | 4개월 전 | 588 | ||
| 2659 |
Modify
|
4개월 전 | 653 | |
| 2658 |
선택과집중
|
4개월 전 | 415 | |
| 2657 | 4개월 전 | 452 | ||
| 2656 |
|
4개월 전 | 964 | |
| 2655 |
선택과집중
|
4개월 전 | 548 | |
| 2654 | 4개월 전 | 403 | ||
| 2653 |
선택과집중
|
5개월 전 | 585 | |
| 2652 | 5개월 전 | 394 | ||
| 2651 | 5개월 전 | 446 | ||
| 2650 |
선택과집중
|
5개월 전 | 327 | |
| 2649 |
선택과집중
|
5개월 전 | 423 | |
| 2648 | 5개월 전 | 441 | ||
| 2647 |
welcome
|
5개월 전 | 545 | |
| 2646 |
디지털홍익인간
|
5개월 전 | 453 | |
| 2645 | 5개월 전 | 466 | ||
| 2644 |
선택과집중
|
5개월 전 | 512 | |
| 2643 | 5개월 전 | 456 | ||
| 2642 | 5개월 전 | 372 | ||
| 2641 | 5개월 전 | 358 | ||
| 2640 | 5개월 전 | 394 | ||
| 2639 | 5개월 전 | 1358 | ||
| 2638 |
|
5개월 전 | 510 | |
| 2637 |
세르반데스
|
5개월 전 | 398 | |
| 2636 |
선택과집중
|
5개월 전 | 568 | |
| 2635 |
선택과집중
|
6개월 전 | 682 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기