打印博客
- 关闭浏览器限制
- 浏览器打开对应博客,F12,在console下粘贴如下代码,回车
(function doPrint(){
var head_str = "<html><head><title></title></head><body>";
var foot_str = "</body></html>";
var older = document.body.innerHTML;
var print = document.getElementsByClassName('blog-content-box')[0].innerHTML;
document.body.innerHTML = head_str + print + foot_str;
window.print();
document.body.innerHTML = older;
})();