zoukankan      html  css  js  c++  java
  • 打印CSDN博客内容JS

    https://blog.csdn.net/jdy_lyy/article/details/102923471

    使用如下代码,先进入到打印界面

    (function(){
    $("#side").remove();
    $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
    $(".nav_top_2011, #header, #navigator").remove();
    $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box").remove();
    $("aside").remove();
    $(".csdn-side-toolbar").remove();
    $(".tool-box").remove();
    $("main").css('display','content'); 
    $("main").css('float','left'); 
    
    $("tool-box").remove();
    })();
    

      

    使用如下代码,进行正式打印

    https://www.jianshu.com/p/5b43a2a8081e

    (function(){
    $("#side").remove();
    $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
    $(".nav_top_2011, #header, #navigator").remove();
    $(".csdn-side-toolbar,.template-box,.reward-user-box").remove();
    $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box,#dmp_ad_58").remove();
    $("aside").remove();
    $(".tool-box").remove();
    $("main").css('display','content');
    $("main").css('float','left');
    $("#mainBox").css('width','1048px');
    $("#mainBox").css('margin-left','0px');
    $("#mainBox").css('margin-right','0px');
    //$("[class='main_father clearfix d-flex justify-content-center']").css("width","1048px");
    $(".main_father.clearfix.d-flex.justify-content-center").css("width","1048px");
    window.print();
    $("tool-box").remove();
    })();
    

      

    (function(){
    $("#side").remove();
    $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
    $(".nav_top_2011, #header, #navigator").remove();
    $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box").remove();
    $("aside").remove();
    $(".csdn-side-toolbar").remove();
    $(".tool-box").remove();
    $("main").css('display','content'); 
    $("main").css('float','left'); 
    
    $("tool-box").remove();
    })();
    
    (function(){
    $("#side").remove();
    $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
    $(".nav_top_2011, #header, #navigator").remove();
    $(".csdn-side-toolbar,.template-box,.reward-user-box").remove();
    $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box,#dmp_ad_58").remove();
    $("aside").remove();
    $(".tool-box").remove();
    $("main").css('display','content');
    $("main").css('float','left');
    $("#mainBox").css('width','1048px');
    $("#mainBox").css('margin-left','0px');
    $("#mainBox").css('margin-right','0px');
    //$("[class='main_father clearfix d-flex justify-content-center']").css("width","1048px");
    $(".main_father.clearfix.d-flex.justify-content-center").css("width","1048px");
    window.print();
    $("tool-box").remove();
    })();
    

      




    Le vent se lève! . . . il faut tenter de vivre!


    Le vent se lève! . . . il faut tenter de vivre!
  • 相关阅读:
    Mysql命令大全
    查看LINUX进程内存占用情况
    PHP内存溢出 Allowed memory size of 解决办法
    Selenium--->环境配置
    自定义一个web框架
    django 使用记录
    javascript
    paramiko 及堡垒机初步接触
    python 操作 redis
    python rabbitmq
  • 原文地址:https://www.cnblogs.com/bai2018/p/14901566.html
Copyright © 2011-2022 走看看