Is it possible to capture the particular div content and div contains images or text or anything?
if any possible ways with script please tell me.
Is it possible to capture the particular div content and div contains images or text or anything?
if any possible ways with script please tell me.
I don't know of a way to 'screenshot' an element, but what you could do, is draw the the div into a canvas element, then use the HTMLCanvasElement
object's toDataURL
function to get a data:
URI with the image's contents.
as
var c = document.getElementById('the_canvas_element_id');
var t = c.getContext('2d');
/* then use the canvas 2D drawing functions to add text, etc. for the result */
When the user clicks "Capture", do this:
window.open('', document.getElementById('the_canvas_element_id').toDataURL());
This will open a new tab or window with the 'screenshot', allowing the user to save it.