3

쉽고 간편한 인쇄 팁

    - 관련파일
        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개

좋은 정보네요. 감사합니다! 적용해보겠습니다.
좋은 정보입니다. 적용해보도록 하겠습니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
7년 전 조회 6,744
7년 전 조회 4,998
7년 전 조회 4,769
7년 전 조회 5,282
7년 전 조회 5,038
7년 전 조회 4,421
7년 전 조회 6,443
7년 전 조회 6,953
7년 전 조회 4,952
7년 전 조회 3,556
7년 전 조회 3,822
7년 전 조회 6,508
7년 전 조회 1.1만
7년 전 조회 7,414
7년 전 조회 4,707
7년 전 조회 4,423
7년 전 조회 4,301
7년 전 조회 5,368
7년 전 조회 5,948
7년 전 조회 4,542
7년 전 조회 9,862
7년 전 조회 1.4만
7년 전 조회 4,805
7년 전 조회 5,853
7년 전 조회 3,445
7년 전 조회 3,806
7년 전 조회 8,693
7년 전 조회 6,682
7년 전 조회 1.2만
7년 전 조회 5,275