打印頁面

//打印頁面設置
   function printsetup()
   {
    wb.execwb(8,1);
   }
   // 打印頁面預覽  
   function printpreview()
   {   
    document.Form1.style.display="none";  
    factory.printing.header="";//頁眉
    factory.printing.footer="";
     //factory.printing.SetMarginMeasure(1);//頁邊距,單位爲毫米
     //factory.printing.leftMargin=20;
     //factory.printing.topMargin=20;
     //factory.printing.portrait=true;//是否爲縱向打印,橫向打印爲false
     //factory.printing.Print(true);//無確認打印,true時打印前須要進行確認
    wb.execwb(7,1); 
    document.Form1.style.display="block";
    //document.getElementById("divShenHe").style.display="block"; 
   }
   function printit()
   {
    document.Form1.style.display="none";         
    factory.printing.header="";//頁眉
    factory.printing.footer="";
    //  factory.printing.SetMarginMeasure(1);//頁邊距,單位爲毫米
    //  factory.printing.leftMargin=20;
    //  factory.printing.topMargin=20;
    // factory.printing.portrait=false;//是否爲縱向打印,橫向打印爲false
    //factory.printing.Print(true);//無確認打印,true時打印前須要進行確
     if (confirm('肯定打印嗎?'))  
      wb.execwb(6,1);     //(6,6)
    document.Form1.style.display="block";
   }  orm

 

在body中寫:get

<OBJECT id="wb" name="wb" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" width="0"
   height="0" VIEWASTEXT>
  </OBJECT>it

相關文章
相關標籤/搜索