원하는 부분만 인쇄하기 > script

본문 바로가기
사이트 내 전체검색

script

원하는 부분만 인쇄하기

페이지 정보

작성자 서방님 댓글 0건 조회 427회 작성일 07-08-08 10:44

본문

<HTML> <HEAD> <TITLE> 원하는 부분만 인쇄하기 </TITLE>
<script language="JavaScript">
var initBody
function beforePrint()
{
 initBody = document.body.innerHTML;
 document.body.innerHTML = idPrint.innerHTML;
}

function afterPrint()
{
 document.body.innerHTML = initBody;
}

function printArea()
{
 window.print();
}

window.onbeforeprint = beforePrint;
window.onafterprint = afterPrint;

</script>
</HEAD>
<BODY> 기본 문서 내용...<br> . <br> . <br> . <br> 인쇄할 때 제외될 영역 입니다.
<br><br>
<div id="idPrint"> 이 부분만 인쇄를 하고 싶습니다. <br>
</div>

<input type="button" value="부분 출력하기" onclick="printArea();"> </BODY> </HTML>

 


출처 :  http://jsguide.net/ver2/examples/index.php?mode=view&uid=542&page=1

댓글목록

등록된 댓글이 없습니다.

Total 846건 40 페이지
script 목록
번호 제목 글쓴이 조회 날짜
261 서방님 262 08-08
260 서방님 674 08-08
259 서방님 350 08-08
258 서방님 707 08-08
열람중 서방님 428 08-08
256 서방님 406 08-08
255 서방님 636 08-08
254 서방님 559 08-08
253 서방님 221 08-08
252 서방님 461 08-08
251 서방님 498 08-08
250 서방님 214 08-08
249 서방님 529 08-08
248 서방님 479 08-08
247 서방님 448 08-08
게시물 검색

회원로그인

접속자집계

오늘
459
어제
1,871
최대
2,993
전체
261,195
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.