惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - 凌寒飘香

jquery getJSON bat 结束进程 mysql 行转列 ASP.NET连接Oracle数据库的步骤详解(转) mysql event mysql安装出现error Nr.1045 (转) windows服务(installutil.exe)报错。异常来自 HRESULT:0x80131515 NSIS堆栈 Push,Pop用法详解(转) bat,copy 文件 js ,String.format gridview模板页面调用js函数 执行带out参数的存储过程sql 无线网络配置 readexcel jquery.validate.min.js 无线路由设置 pmi id 查询 天龙八部,小师妹,李沧海,齐御风 Windows Server 2008开机取消必须输入密码登录系统,不要按CTRL+ALT+DEL”,
打印配置
凌寒飘香 · 2013-01-24 · via 博客园 - 凌寒飘香

<script language="javascript" type="text/javascript">
 
    //打印前的方法
    function window.onbeforeprint() {
        if (document.getElementById("btPrint") != null)
            document.getElementById("btPrint").style.display = "none";
    }
    var setActive = false;
    function Print2() {
        pagesetup_null();
        if (setActive == false) {
            if (confirm("请启用IE的ActiveX控件!否则可能引起打印不美观。是否要继续打印?")) {
                window.print();
                document.getElementById("btPrint").style.display = "block";
            }
            else {
                document.getElementById("btPrint").style.display = "block";
            }
        }
        else {
            window.print();
            document.getElementById("btPrint").style.display = "block";
        }
        //window.location.reload();
    }
 
    var hkey_root, hkey_path, hkey_key
    hkey_root = "HKEY_CURRENT_USER"
    hkey_path = "\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"
    //设置网页打印的页眉页脚为空,打印背景色
    function pagesetup_null() {
        try {
            var RegWsh = new ActiveXObject("WScript.Shell")
            hkey_key = "header"
            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")

            hkey_key = "footer"
            //RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "&w&b页码,&p/&p")
            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")
            hkey_key = "Print_Background"
            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "yes")

            hkey_key = "margin_top"; //注册表中的0.75对应于网页的19.05
            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.18");

            hkey_key = "margin_bottom"; //注册表中的0.75对应于网页的19.05
            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.18");

            hkey_key = "margin_left"; //注册表中的0.75对应于网页的19.05
            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.3");

            hkey_key = "margin_right"; //注册表中的0.75对应于网页的19.05
            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.2");
            setActive = true;

        } catch (e) { }
    }
    window.onload = function () {
        var theDiv = document.getElementsByTagName("div")[0];
        theDiv.parentNode.removeChild(theDiv);       
    }
</script>