var shotit = function() {
html2canvas(document.body, {
onrendered: function(canvas) {
document.body.appendChild(canvas);
var link = document.createElement("a");
link.download = 'myImg.jpg';
link.href = canvas.toDataURL('image/jpeg');
link.click();
}
});
}