"분류 전체보기"에 해당되는 글 - 39건
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>';
?>
'그누보드5' 카테고리의 다른 글
그누보드5 3.1.2 세팅 (0) | 2018.05.11 |
---|---|
반응형 스마트에디터 입니다. (0) | 2018.05.09 |
게시판 첨부파일 썸네일 호출방법 (0) | 2018.04.30 |
게시판 작성일자 형태 변경 (0) | 2018.03.21 |
그누보드5 게시판 여분필드 한 개를 이용해서 여러 개로 분할하기 (0) | 2018.03.21 |
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
'javascript, jQuery' 카테고리의 다른 글
자바스크립트 지역셀렉트 선택 (0) | 2018.05.14 |
---|---|
일주일동안 팝업 보지않기 (0) | 2018.04.10 |
자바스크립트 즐겨찾기 (0) | 2018.03.21 |
레이어 팝업시 스크롤 터치스크롤 막기 (0) | 2018.03.21 |
가장 많이 쓰이는 벨리데이션 (0) | 2018.03.21 |
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
Post
'학습자료' 카테고리의 다른 글
가상드라이버 다운로드 (0) | 2018.06.12 |
---|---|
폰트 라이센스 (0) | 2018.05.10 |
브라우저별 쿠키 확인법 (크롬, 파이어폭스, IE11) (0) | 2018.04.10 |
jQuery 입문용 (0) | 2018.03.23 |
html5, css3 입문하시는분들 추천합니다. (0) | 2018.03.23 |
Post
'학습자료' 카테고리의 다른 글
가상드라이버 다운로드 (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
'학습자료' 카테고리의 다른 글
가상드라이버 다운로드 (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 < 23
window.sidebar.addPanel(bookmarkTitle, bookmarkURL, '');
} else if ((window.sidebar && (navigator.userAgent.toLowerCase().indexOf('firefox') < -1)) || (window.opera && window.print)) {
// Firefox version >= 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;
});
});
'javascript, jQuery' 카테고리의 다른 글
일주일동안 팝업 보지않기 (0) | 2018.04.10 |
---|---|
iframe 접근방법 (0) | 2018.03.23 |
레이어 팝업시 스크롤 터치스크롤 막기 (0) | 2018.03.21 |
가장 많이 쓰이는 벨리데이션 (0) | 2018.03.21 |
모바일기기 인식 스크립트 (0) | 2018.03.21 |
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 = 일
'그누보드5' 카테고리의 다른 글
그누보드5 3.1.2 세팅 (0) | 2018.05.11 |
---|---|
반응형 스마트에디터 입니다. (0) | 2018.05.09 |
게시판 첨부파일 썸네일 호출방법 (0) | 2018.04.30 |
게시판 리스트 에디터에서 썸네일만 호출하기 (0) | 2018.03.28 |
그누보드5 게시판 여분필드 한 개를 이용해서 여러 개로 분할하기 (0) | 2018.03.21 |