豆丁网页能看到的文档都是canvas渲染的。
转成图片以后可以保存到本地。
var canvass = document.getElementsByTagName('canvas');
var s = '<table id="list_canvas" class="list">\n<tr><th>ID</th><th>Canvas</th><th>Size</th></tr>\n';
for (i=0; i<canvass.length; i++) {
s = s + '<tr><td>' + (i+1) + '</td><td><img src="' + canvass[i].toDataURL("image/png") + '"></td><td>' + canvass[i].width + ' X ' + canvass[i].height +'</td></tr>\n';
}
s += '</table>\n';