下载CSDN文章
有些时候我们需要下载CSDN文章的内容,以下是下载CSDN网页文章的方法:
1.打开要下载的网页
2.按F12,进入控制台
3.在空白处输入以下代码,回车
(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();
$(".csdn-side-toolbar").remove();
$(".more-toolbox").remove();
$(".template-box").remove();
$(".left-toolbox").remove();
$(".bottom-pub-footer").remove();
$(".pre-numbering").remove();
$("main").css('display','content');
$("main").css('float','left');
$("#mainBox").css('width','100%');
$(".main_father.clearfix.d-flex.justify-content-center").css("width","100%");
window.print();
$("tool-box").remove();
})();4.选择另存为PDF,页面选择全部,布局选择横向,点击保存,将网页内容以pdf的形式保存到本地



