How to print CSDN blog? CSDN blog content will be saved as a PDF and then download

  1. Into the article page
  2. Press F12
  3. Click Console
  4. Enter the following code, and then press ENTER
(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();
})();

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Published 138 original articles · won praise 224 · views 50000 +

Guess you like

Origin blog.csdn.net/qq_43546676/article/details/104429809