쉽고 간편한 인쇄 팁
- 관련파일
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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 23606 | |
| 23598 | |
| 23585 | |
| 23579 | |
| 23578 | |
| 23564 | |
| 23550 | |
| 23549 | |
| 23548 | |
| 23529 | |
| 23510 | |
| 23507 | |
| 23481 | |
| 23471 | |
| 23453 | |
| 23452 | |
| 23450 | |
| 23436 | |
| 23428 | |
| 23404 | |
| 23396 | |
| 23389 | |
| 23380 | |
| 23369 | |
| 23350 | |
| 23337 | |
| 23317 | |
| 23307 | |
| 23298 | |
| 23290 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기