zoukankan      html  css  js  c++  java
  • Javascript控制页面打印

    Javascript代码:

    <script language="javascript" type="text/javascript">
    function printsetup(){wb.execwb(8,1); } 
    function printpreview(){wb.execwb(7,1);} 
    function printit(){wb.execwb(6,6)} 
    function printclose(){wb.execwb(45,1);} 
    //WebBrowser.ExecWB(1,1) 打开  
    //
    Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口  
    //
    Web.ExecWB(4,1) 保存网页  
    //
    Web.ExecWB(6,1) 打印  
    //
    Web.ExecWB(7,1) 打印预览  
    //
    Web.ExecWB(8,1) 打印页面设置  
    //
    Web.ExecWB(10,1) 查看页面属性  
    //
    Web.ExecWB(15,1) 好像是撤销,有待确认  
    //
    Web.ExecWB(17,1) 全选  
    //
    Web.ExecWB(22,1) 刷新  
    //
    Web.ExecWB(45,1) 关闭窗体无提示 
    </script>


    CSS代码:

    <style media="print" type="text/css"> 
    .Noprint
    {display:none;} 
    .NextPage
    {page-break-before:always;}
    </style>


    网页代码:

    Code


     

  • 相关阅读:
    泛型与非泛型
    C# 调用CMD,执行DOS命令
    数据库设计随笔(ZZ)
    关于三层开发(zz)
    三层架构学习(转)
    Node.js & child_process All In One
    HTML5 Canvas Tag Cloud All In One
    macOS & VSCode terminal show current git branch All In One
    飞书 excel 固定列 All In One
    git diff one of committed file All In One
  • 原文地址:https://www.cnblogs.com/cnaspnet/p/1337196.html
Copyright © 2011-2022 走看看