쉽고 간편한 인쇄 팁
- 관련파일
ecos_include_printBody
printBody.php
설명서.txt
- 설치
- 압축을 푼 ecos_include_printBody 폴더를 스킨폴더에 이동한다.
- 인쇄 기능을 추가하고자 하는 기존 스킨의 view.skin.php 임의의 위치에 아래 코드를 적용한다.
<?php include_once($board_skin_path.'/../ecos_include_printBody/printBody.php'); ?>
// _/_/_/_/_/_/_/_/_/_/_/_/_/
// printBody.php 내용
// _/_/_/_/_/_/_/_/_/_/_/_/_/
<style>
@media print {
#bo_vc_w, #bo_v_top, #bo_v_share, .cmt_btn, .btn { display: none !important; }
}
</style>
<input class="btn_b01 btn" style="float:right; margin: 10px;border-radius: 4px;" type='button' id='btn' value='인쇄' onclick='printDiv();'>
<script>
function printDiv() {
var divToPrint=document.getElementById('container');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>
newWin.document.close();
setTimeout(function(){newWin.close();},10);
}
</script>
댓글 4개
게시글 목록
| 번호 | 제목 |
|---|---|
| 24318 | |
| 24317 | |
| 24315 | |
| 24309 | |
| 24294 | |
| 24293 | |
| 24277 | |
| 24262 | |
| 24260 | |
| 24253 | |
| 24251 | |
| 24236 | |
| 24233 | |
| 24228 | |
| 24226 | |
| 24221 | |
| 24214 | |
| 24203 | |
| 24201 | |
| 24199 | |
| 24196 | |
| 24195 | |
| 24194 | |
| 24192 | |
| 24191 | |
| 24187 | |
| 24185 | |
| 24183 | |
| 24172 | |
| 24168 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기