페이지의 특정부분 프린트 하기
<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 팁자료실
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3289 | 9년 전 | 4819 | ||
| 3288 | 9년 전 | 5803 | ||
| 3287 |
|
9년 전 | 3507 | |
| 3286 |
또치하우스
|
9년 전 | 12303 | |
| 3285 | 9년 전 | 11505 | ||
| 3284 |
다람쥐7마리
|
10년 전 | 4682 | |
| 3283 |
블랙초콜렛더블샷
|
10년 전 | 5974 | |
| 3282 |
또치하우스
|
10년 전 | 10272 | |
| 3281 | 10년 전 | 9789 | ||
| 3280 | 10년 전 | 4994 | ||
| 3279 | 10년 전 | 4274 | ||
| 3278 | 10년 전 | 5359 | ||
| 3277 |
|
10년 전 | 5268 | |
| 3276 | 10년 전 | 5781 | ||
| 3275 | 10년 전 | 4352 | ||
| 3274 | 10년 전 | 5594 | ||
| 3273 | 10년 전 | 6909 | ||
| 3272 | 10년 전 | 7223 | ||
| 3271 | 10년 전 | 4936 | ||
| 3270 |
|
10년 전 | 5406 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기