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

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

script

원하는 부분만 인쇄하기

페이지 정보

작성자 서방님 댓글 0건 조회 155회 작성일 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 서방님 86 08-08
260 서방님 102 08-08
259 서방님 137 08-08
258 서방님 103 08-08
열람중 서방님 156 08-08
256 서방님 81 08-08
255 서방님 429 08-08
254 서방님 325 08-08
253 서방님 80 08-08
252 서방님 189 08-08
251 서방님 190 08-08
250 서방님 79 08-08
249 서방님 147 08-08
248 서방님 202 08-08
247 서방님 163 08-08
게시물 검색

회원로그인

접속자집계

오늘
25
어제
302
최대
1,347
전체
155,086
Latest Crypto Fear & Greed Index

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