打印CSDN博文内容,将以下js复制放入Chrome开发者选项里边的console,回车即可。
具体步骤
1、在空白处右键。选择“检查”
2、点击上面的console选项,
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();
$("main").css('display','content');
$("main").css('float','left');
window.print();
$("tool-box").remove();
})();