Generate an image of a div and Save as
问题 I'd like to create an input button "Save image" that : take a screen shot of a div ask to "Save as" on the user's computer I've found how to create a screen of a dive using html2canvas and to open it in a new tab, it works perfectly : function printDiv2(div) { html2canvas((div), { onrendered: function(canvas) { var img = canvas.toDataURL(); window.open(img); } }); } But for thee Save as part, is a kind of the tough part... I've found interesting topics, as I'm new in JS (and object) coding, I