Post

관리자페이지 -> 게시판관리 -> 수정 -> 게시판기능설정 -> 목록에서 내용 사용 체크

에디터에 들어간 이미지만 썸네일로 사용하는 방법입니다.

썸네일을 뽑아오는 호출문 입니다.


<?php

$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);

if($thumb['src']) {

$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" alt="">';

} else {

//$img_content = '<img src="'.G5_URL.'/ko/images/sub/story02_t.jpg" alt="" /><span></span>';

}

echo '<div class="image">'.$img_content.'</div>';

?>

Post

<body>

  <iframe id=“iframeA” src=“test.html”></iframe>

</body>



// iframe 접근

window.frames.length; // 1

window.frames[0].document; // iframe의 window의 document객체

document.getElementById('iframeA'); // iframe 엘리먼트

document.getElementById('iframeA').contentWindow.document; // iframe의 window의 document객체




// iframe객체의 window

$('iframe').get(0).contentWindow   // window




// iframe객체의 document

$('iframe').get(0).contentDocument // document

// 또는 

$('iframe').get(0).contentWindow.document   // document




// 부모html에서 자식iframe 함수 실행

$('#iframe').get(0).contentWindow.함수명;

$('#iframe')[0].contentWindow.함수명;




// 부모html에서 자식iframe 변수접근

$('#iframe').get(0).contentWindow.변수명;




// 부모html에서 자식iframe 접근, 제어  // jQuery

$('#iframe').contents().find('#foo').text('안녕하세요');




// 자식iframe에서 부모 html 변수, 함수 호출

window.parent.변수명; // 한단계 부모  // 그렇다면 두단계 부모는??  window.parent.parent.변수명

window.top.변수명; // 최상위 부모 // html(최상위) -> iframe -> iframe - iframe(자식) (여기에서 top을 쓰면 최상위 부모로 접근, parent를 쓰면 바로위 iframe에 접근)




// iframe 이전페이지로

$('iframe').get(0).contentWindow.history.go(-1);      




// iframe 새로고침

$('iframe').get(0).contentDocument.location.reload();




// iframe 로드

$('iframe').load(function(){    // iframe이 모두 load된후 제어

    $(this).contents().find('body');

});




// 자식iframe에서 부모html의 다른 iframe에 접근

$('제어할 아이디', parent.frames["부모창 제어할 frame의 name값"].document).html("여기도 제어한다.");




// 자식iframe에서 부모html 접근 (최상위 부모html에 접근된다.)

$('부모창 제어할 아이디', parent.document).contents().find('body').html(); // $('부모창 제어할 아이디', parent.document) -> $('#ID이름',top.document)로 변경해도 된다.


// 팝업창에서는??? opener

$("#id",opener.document).css("display","none");




// 현재창이 iframe인지 여부 확인

// self는 iframe

// top은 self를 포함하는 부모페이지(최상위)

console.log(self == top)





// html -> iframe -> iframe -> iframe 이런 구조일 경우

// 자식iframe 한단계 윗 부모html(iframe)에 접근하기


window.frameElement     // iframe   또는  this.frameElement 

.parentNode                // 부모 


<div>

    <iframe src="sub.html"></iframe>

</div> 

window.frameElement.parentNode // 자식iframe을 감싸는 부모는 div가 된다.

if(!window.frameElement){ console.log('최상위 프레임'); }  // 요소(node)가 iframe이 아닐경우에는 최상위(root)부모 html 이다.




// 부모에서 -> 자식 iframe body에 걸려있는 이벤트 trigger("이벤트명", "전달객체")

$('#iframe2')[0].contentWindow.$('body').trigger('eventEvnt', {"a": "홍길동"});

document.getElementById('iframe2').contentWindow.$('body').trigger('eventEvnt', {"a": "홍길동"});     


   


// 자식에서 -> 부모 iframe body에 걸려있는 이벤트 trigger("이벤트명", "전달객체")

// this.$('div')   // 이런개념 this(window)는 생략 가능하므로.. 다른 iframe에선 명시적으로 (top, parent)앞에 붙여준다.

top.$('body').trigger('eventname', {"a" : "홍길동"});            // 최상위 iframe 접근 (root개념)

parent.$('body').trigger('eventname', {"a" : "홍길동"});         // 한단계 위 부모 iframe 접근

parent.parent.$('body').trigger('eventname', {"a" : "홍길동"});  // 두단계 위 부모 iframe 접근





// 부모에 jQuery 가 로딩되어 있다면 굳이 다시 로딩 할 거 없이 이렇게 

(function($, f) { 

    $(function() { 

        $(f).closest('form').find('[name=image]').val("test"); 

    }); 

})(parent.jQuery, window.frameElement); 




 

// 속성줄때 

.appendTo($('#ID이름', parent.document))       // 이렇게하면 ID를 못찾는다

.appendTo($(top.document).find("# ID이름"));  // 이런식으로 속성주면 된다





윈도우객체, iframe 참고 : http://ohgyun.com/531



출처 : http://mylife365.tistory.com/10

Post

html5 기본세팅 환경입니다.


setting.zip


Post

table 태그에서 말줄임 사용하는 방법

table {table-layout: fixed;}

말줄임이 필요한 셀렉트 {white-space:nowrap; text-overflow:ellipsis; overflow:hidden;}



말줄임 비적용


번호 제목 작성자
3

안녕하세요. 봉구입니다.안녕하세요

아무개
2 안녕하세요. 봉구입니다.안녕하세요. 봉구입니다.안녕하세요. 봉구입니다.안녕하세요. 봉구입니다. 아무개
1 안녕하세요. 봉구입니다. 아무개




말줄임 적용


번호 제목 작성자
3 안녕하세요. 봉구입니다.안녕하세요. 아무개
2

안녕하세요. 봉구입니다.안녕하세요. 봉구입니다.안녕하세요. 봉구입니다.안녕하세요. 봉구입니다.

아무개
1 안녕하세요. 봉구입니다. 아무개


'html,css' 카테고리의 다른 글

placeholder 속성 변경하기  (0) 2019.04.09
유튜브 영상 반응형으로 넣기  (0) 2019.04.09
반응형 폰트설정  (0) 2018.03.21
ie8 이하에서 투명 배경 적용  (0) 2018.03.21

Post

구글 검색엔진 최적화를 위한 정보입니다.


구글 검색엔진(search-engine-optimization)최적화guide.pdf


Post

css 입문

[ 학습자료 ] 2018. 3. 23. 15:40

css에 어려움을 겪고 있는분들에게 추천합니다.


css.pdf


Post

jQuery 입문용

[ 학습자료 ] 2018. 3. 23. 15:38

JQuery 입문하시는분들이나 기초가 부족하신분들에게 추천합니다.


jQuery_01.pdf


'학습자료' 카테고리의 다른 글

가상드라이버 다운로드  (0) 2018.06.12
폰트 라이센스  (0) 2018.05.10
브라우저별 쿠키 확인법 (크롬, 파이어폭스, IE11)  (0) 2018.04.10
css 입문  (0) 2018.03.23
html5, css3 입문하시는분들 추천합니다.  (0) 2018.03.23

Post

입문하신분들이나 기초가 부족하신분들에게 추천합니다.


html5_css3.pdf


'학습자료' 카테고리의 다른 글

가상드라이버 다운로드  (0) 2018.06.12
폰트 라이센스  (0) 2018.05.10
브라우저별 쿠키 확인법 (크롬, 파이어폭스, IE11)  (0) 2018.04.10
css 입문  (0) 2018.03.23
jQuery 입문용  (0) 2018.03.23

Post

브라우저 지원사항

  • IE 모든 브라우저 지원
  • Chrome 단축키 알림을 띄움
  • Opera 단축키 알림을 띄움
  • Firefox 지원
  • Safari 테스트 못해봄


$(document).ready(function(){

  $(셀렉트).on('click', function(e) {  

    var bookmarkURL = window.location.href;

    var bookmarkTitle = document.title;

    var triggerDefault = false;


    if (window.sidebar && window.sidebar.addPanel) {

        // Firefox version &lt; 23

        window.sidebar.addPanel(bookmarkTitle, bookmarkURL, '');

    } else if ((window.sidebar && (navigator.userAgent.toLowerCase().indexOf('firefox') < -1)) || (window.opera && window.print)) {

        // Firefox version &gt;= 23 and Opera Hotlist

        var $this = $(this);

        $this.attr('href', bookmarkURL);

        $this.attr('title', bookmarkTitle);

        $this.attr('rel', 'sidebar');

        $this.off(e);

        triggerDefault = true;

    } else if (window.external && ('AddFavorite' in window.external)) {

        // IE Favorite

        window.external.AddFavorite(bookmarkURL, bookmarkTitle);

    } else {

        // WebKit - Safari/Chrome

        alert((navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Cmd' : 'Ctrl') + '+D 를 이용해 이 페이지를 즐겨찾기에 추가할 수 있습니다.');

    }


    return triggerDefault;

});

});

Post

<?php echo date("y-m-d", strtotime($list[$i]['wr_datetime'])) ?> : 15-12-25

<?php echo date("Y-m-d", strtotime($list[$i]['wr_datetime'])) ?> : 2015-12-25

<?php echo date("y-m-d H:i", strtotime($list[$i]['wr_datetime'])) ?> : 15-12-25 00:00

<?php echo date("m-d", strtotime($list[$i]['wr_datetime'])) ?> : 12-25 


y = 년

m = 월

d = 일

▲ top