레이어를 이용한 특정 범위 인쇄
페이지 정보
작성자 MintState 댓글 0건 조회 13,025회 작성일 08-11-10 11:44본문
레이어를 이용한 특정 범위 인쇄
<script>
var initBody;
function beforePrint()
{
initBody = document.body.innerHTML;
document.body.innerHTML = div_page.innerHTML;
}
function afterPrint()
{
document.body.innerHTML = initBody;
}
function pageprint()
{
window.onbeforeprint = beforePrint;
window.onafterprint = afterPrint;
window.print();
}
</script>
<a href="#" onclick="pageprint()"> 인쇄하기</a>
<div id="div_page">
여기만 인쇄
여기만 인쇄
여기만 인쇄
여기만 인쇄
</div>|
|
댓글목록
등록된 댓글이 없습니다.





레이어를 이용한 특정 범위 인쇄