zoukankan      html  css  js  c++  java
  • js中window.print()去除页眉页脚

    //jsp打印时去除页眉页页脚 打印前加入下面代码即可

    var HKEY_Root,HKEY_Path,HKEY_Key;

    HKEY_Root="HKEY_CURRENT_USER";

    HKEY_Path="\Software\Microsoft\Internet Explorer\PageSetup\";

    var head,foot,top,bottom,left,right;

    var Wsh=new ActiveXObject("WScript.Shell");

     HKEY_Key="header";

    //设置页眉(为空) 根据你自己要设置的填入 

    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");

     HKEY_Key="footer";

    //设置页脚(为空) 根据你自己要设置的填入 

    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");

     HKEY_Key="margin_bottom";

    //设置下页边距(0) 根据你自己要设置的填入 

    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0");

     HKEY_Key="margin_left";

    //设置左页边距(0) 根据你自己要设置的填入 

    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"1");

     HKEY_Key="margin_right";

    //设置右页边距(0)

    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0");

     HKEY_Key="margin_top";

    //设置上页边距(8)

    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"1");

  • 相关阅读:
    XV6文件系统
    XV6锁
    PC硬件以及引导加载器
    XV6第一个进程
    XV6操作系统接口
    XV6环境搭建及注意事项
    XV6文件系统
    XV6上下文切换
    少走弯路的十条忠告
    LIBCMTD.lib与libcpmtd冲突的解决方法。
  • 原文地址:https://www.cnblogs.com/dnxf/p/4193954.html
Copyright © 2011-2022 走看看