使用Google Chrome,打印 CSDN 博客内容

版权声明:seowen的Java小本子,欢迎转载! https://blog.csdn.net/weixin_42697074/article/details/88900839


--------------------只留主体 文章块 ----------------------------------

(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();
$(".tool-box").remove();
$("main").css('display','content'); 
$("main").css('float','left'); 
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, .recommend-box, #csdn-toolbar, #tool-box").remove();
$("aside").remove();
$(".tool-box").remove();
$("main").css('display','content'); 
$("main").css('float','left'); 
window.print();

$("tool-box").remove();
})();
 

猜你喜欢

转载自blog.csdn.net/weixin_42697074/article/details/88900839