ScriptX.cab 활용한 웹페이지 인쇄 > JQuery & JavaScript

STUDY ROOM

JQuery & JavaScript

ScriptX.cab 활용한 웹페이지 인쇄

페이지 정보

작성자 JMStudy 작성일08-09-10 11:44 조회8,059회 댓글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>


댓글목록

등록된 댓글이 없습니다.