Copy multiple HTML5 layered canvases to one image in JavaScript
问题 I have multiple HTML5 canvases which are placed on top of one another. The order is important. Canvas 2 will be placed on Canvas 1 and so forth. a) Is there a way I can create a single image (using toDataURL()) of all of these canvases keeping the same order? b) And, then how can I copy this image to a clipboard so that it can be pasted in other applications? 回答1: Steps: Create a new Canvas (maybe hidden) Copy both canvas to the new canvas Copy to image using canvas.toDataURL() See this