HTML&CSS | 웹페이지 부분 인쇄 할때 object
페이지 정보
작성자 굿스웹 작성일19-01-09 17:03 조회1,619회 댓글0건관련링크
본문
<script language="javascript">
function printWindow() {
window.onbeforeprint = beforePrint;
window.onafterprint = afterPrint;
factory.printing.header = "" //윗쪽타이틀
factory.printing.footer = "" //아랫쪽타이틀
factory.printing.portrait = true //인쇄레이아웃설정, 가로(false), 세로(true)
factory.printing.leftMargin = 2.0//왼쪽여백
factory.printing.topMargin = 2.0//윗쪽여백
factory.printing.rightMargin = 2.0 //오른쪽여백
factory.printing.bottomMargin = 2.0 //아랫쪽여백
//factory.printing.Preview(); //인쇄미리보기
factory.printing.Print(false, window) //print with prompt
}
function beforePrint() {
noPrint.style.display = "none";
}
function afterPrint() {
noPrint.style.display = "block";
}
</script>
<div id=noPrint>
출력이 안되는 영역
</div>
<object id=factory viewastext style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="./ScriptX.cab#Version=6,2,433,14"></object>
function printWindow() {
window.onbeforeprint = beforePrint;
window.onafterprint = afterPrint;
factory.printing.header = "" //윗쪽타이틀
factory.printing.footer = "" //아랫쪽타이틀
factory.printing.portrait = true //인쇄레이아웃설정, 가로(false), 세로(true)
factory.printing.leftMargin = 2.0//왼쪽여백
factory.printing.topMargin = 2.0//윗쪽여백
factory.printing.rightMargin = 2.0 //오른쪽여백
factory.printing.bottomMargin = 2.0 //아랫쪽여백
//factory.printing.Preview(); //인쇄미리보기
factory.printing.Print(false, window) //print with prompt
}
function beforePrint() {
noPrint.style.display = "none";
}
function afterPrint() {
noPrint.style.display = "block";
}
</script>
<div id=noPrint>
출력이 안되는 영역
</div>
<object id=factory viewastext style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="./ScriptX.cab#Version=6,2,433,14"></object>
[주소복사] https://www.goodsweb.kr/?u=D41uTbJr
SNS 알리기
핀터레스트
텔레그램로
블로그로
페이스북
트위터
카카오스토리
카톡 공유
관련 블로그
로딩중