zoukankan      html  css  js  c++  java
  • 预览,打印

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style media="print">
    @page {
    size: auto;
    margin: 0mm;
    }
    </style>
    </head>

    <body>
    <p style="font-family: serif;">
    备注 :1、本表一式四份,企业、功能区企业服务中心、产促中心、财政局各一份。<br/>
    &nbsp;&nbsp;&nbsp;2、企业经营情况均为上一年度数据。<br/>
    &nbsp;&nbsp;&nbsp;3、我区根据企业各方面综合情况给予扶持,最终根据企业实际申请的内容为准。享受政策企业须接受相关主管部门监督,若有违法违规事项,则取消扶持资格。<br/>
    </p>
    <div id="put" style=" 100%;height:10%; text-align: center; font-size: 15px;padding-top: 30px;">
    <div style="126px;height: 36px;background:#bcbcc5;margin:0 auto;padding:0 auto; border: 1px solid ;border-radius:12px">
    <a href="javascript:void(0);" onclick="print_page();">
    <div style="margin-top: 8px;">
    打&nbsp;&nbsp;&nbsp;印
    </div>
    </a>
    </div>
    </div>
    </body>
    <script type="text/javascript">
    function print_page() {
    if (!!window.ActiveXObject || "ActiveXObject" in window) {
    remove_ie_header_and_footer();
    }
    window.print();
    };

    function remove_ie_header_and_footer() {
    var hkey_root, hkey_path, hkey_key;
    hkey_path = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup\";
    try {
    var RegWsh = new ActiveXObject("WScript.Shell");
    RegWsh.RegWrite(hkey_path + "header", "");
    RegWsh.RegWrite(hkey_path + "footer", "");
    } catch (e) {}
    }
    </script>
    </html>

  • 相关阅读:
    【Jenkins】插件更改国内源
    【Jenkins】参数化引用
    【selenium】各种exception
    利用浏览器的console篡改cookie
    【python】django 分页器 Paginator 基础操作
    centos7 安装php7遇到的问题
    归并排序(自顶向下、原地归并)
    希尔排序
    插入排序
    选择排序
  • 原文地址:https://www.cnblogs.com/cws-kf/p/8556193.html
Copyright © 2011-2022 走看看