div태그로 지정된 영역만 출력
페이지 정보
작성자
관리자
작성일
2008.02.22 14:34
6,942 조회
본문
<html>
<head>
<title>http://www.blueb.co.kr</title>
<script type="text/javascript">
var win=null;
function printIt(printThis) {
win = window.open();
self.focus();
win.document.open();
win.document.write('<'+'html'+'><'+'head'+'><'+'style'+'>');
win.document.write('body, td { font-family: Verdana; font-size: 10pt;}');
win.document.write('<'+'/'+'style'+'><'+'/'+'head'+'><'+'body'+'>');
win.document.write(printThis);
win.document.write('<'+'/'+'body'+'><'+'/'+'html'+'>');
win.document.close();
win.print();
win.close();
}
</script>
</head>
<body>
<a href="javascript:printIt(document.getElementById('printme').innerHTML)">Print</a><p>
<div id="printme">
이 부분만 출력</div>
</body>
</html>
<head>
<title>http://www.blueb.co.kr</title>
<script type="text/javascript">
var win=null;
function printIt(printThis) {
win = window.open();
self.focus();
win.document.open();
win.document.write('<'+'html'+'><'+'head'+'><'+'style'+'>');
win.document.write('body, td { font-family: Verdana; font-size: 10pt;}');
win.document.write('<'+'/'+'style'+'><'+'/'+'head'+'><'+'body'+'>');
win.document.write(printThis);
win.document.write('<'+'/'+'body'+'><'+'/'+'html'+'>');
win.document.close();
win.print();
win.close();
}
</script>
</head>
<body>
<a href="javascript:printIt(document.getElementById('printme').innerHTML)">Print</a><p>
<div id="printme">
이 부분만 출력</div>
</body>
</html>
댓글 0