How to make the image of specific html div or how can I take screenshot of specific area in JS?

Viewed 26

I want to take a screenshot of a specific div tag or specific defined area on button click event in javascript. I try canvas's method but it only makes the image of canvas data if any other data is there on the canvas area it ignores the other data and background image etc. Following is the desired image that I want and captured images using canvas. Any help to get my actual image whenever I click on the button.

Desired: Desired Image

Captured through canvas.toDataURL("image/png"): Captured through canvas.toDataURL()

0 Answers
Related