텔

페이지의 특정부분 프린트 하기

<div id="print">
<object id=factory viewastext style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  codebase="ScriptX.cab#Version=6,1,431,8">
</object>

여기부분 출력할레요.

</div>

<a href="#" onclick="printArea()">인쇄하기</a>

<script type="text/javascript">
<!--
var initBody;

function beforePrint() {
 prints = document.body.innerHTML;
 document.body.innerHTML = document.getElementById('print').innerHTML;
}
function afterPrint() {
 document.body.innerHTML = prints;
}
function printArea() {
  factory.printing.header       = ""
  factory.printing.footer       = ""
  factory.printing.portrait     = true // true 세로출력 , false 가로출력
  factory.printing.leftMargin   = 10
  factory.printing.topMargin    = 10
  factory.printing.rightMargin  = 10
  factory.printing.bottomMargin = 10
  window.print();
}

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

-->
</script>

|

댓글 8개

<object id=factory viewastext style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="scriptX.cab#Version=6,1,431,8">
</object>

이게 출력하고자 하는 div 밖으로 나갈경우 div안의 테이블이나 div속성들이 비정상적으로 출력될수 있습니다.
감사합니다 좀 써보겠습니다 ㅋㅋ
게시판페이지프린트
<div id="print">
<object id=factory viewastext style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="scriptX.cab#Version=6,1,431,8">
</object>

위부분은 병경해서는 안되는가요?
네.
출력하고자 하는 div안에
<object id=factory viewastext style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="scriptX.cab#Version=6,1,431,8">
</object>
가 있어야 작동이 되더라구요./
아 그 print x 였군요 ㄷㄷㄷ
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
11-01-12 조회 4,002
11-01-10 조회 6,092
11-01-06 조회 3,599
11-01-06 조회 6,270
11-01-04 조회 4,519
11-01-03 조회 4,760
10-12-31 조회 7,012
10-12-30 조회 5,312
10-12-29 조회 3,009
10-12-27 조회 1.1만
10-12-24 조회 4,914
10-12-24 조회 5,945
10-12-23 조회 6,652
10-12-21 조회 4,250
10-12-20 조회 5,026
10-12-20 조회 7,897
10-12-20 조회 3,667
10-12-20 조회 4,147
10-12-20 조회 6,492
10-12-18 조회 4,439