현재페이지를 인쇄할때 출력용지에 아무 내용도 안찍히게 설정
페이지 정보
작성자 서방님 댓글 0건 조회 205회 작성일 12-04-26 08:54본문
<html>
<head>
<title>인쇄하면 빈 내용만 출력</title>
<script language="javascript">
<!--
var hideBuf;
function hideBeforePrint() {
hideBuf = document.body.innerHTML;
document.body.innerHTML = '';
}
function showAfterPrint() {
document.body.innerHTML = hideBuf;
}
window.onbeforeprint = hideBeforePrint;
window.onafterprint = showAfterPrint;
//-->
</script>
</head>
<body>
현재페이지를 프린터로 인쇄명령을 내려보세요...
</body>
</html>
댓글목록
등록된 댓글이 없습니다.