페이지의 특정부분 프린트 하기
<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개
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="scriptX.cab#Version=6,1,431,8">
</object>
이게 출력하고자 하는 div 밖으로 나갈경우 div안의 테이블이나 div속성들이 비정상적으로 출력될수 있습니다.
<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>
가 있어야 작동이 되더라구요./
게시판 목록
그누4 팁자료실
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3249 |
|
11년 전 | 6323 | |
| 3248 | 11년 전 | 6075 | ||
| 3247 |
|
11년 전 | 5433 | |
| 3246 | 11년 전 | 7163 | ||
| 3245 | 11년 전 | 4556 | ||
| 3244 | 11년 전 | 5218 | ||
| 3243 | 11년 전 | 5669 | ||
| 3242 |
|
11년 전 | 6515 | |
| 3241 |
saintbe
|
11년 전 | 5657 | |
| 3240 |
|
11년 전 | 5377 | |
| 3239 |
|
11년 전 | 3944 | |
| 3238 |
sahara
|
11년 전 | 5115 | |
| 3237 |
커네드커네드
|
11년 전 | 4661 | |
| 3236 |
|
11년 전 | 6916 | |
| 3235 |
사노라가노라
|
11년 전 | 3968 | |
| 3234 | 11년 전 | 4770 | ||
| 3233 | 11년 전 | 7912 | ||
| 3232 | 11년 전 | 8207 | ||
| 3231 | 11년 전 | 4985 | ||
| 3230 |
다케미카코
|
11년 전 | 5998 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기