0

I already got a lot of ans(Ans1,Ans2) for it but when I am trying to download it by clicking on <a> tag. its showing an error in Google Chromeenter image description here

var dataURL = canvas.toDataURL("image/jpeg"); 
var w = window.open('about:blank', 'image from canvas'); 
w.document.write("<a href='javascript:window.print()' >Print</a>"); 
w.document.write("<a href='"+dataURL+"'> Download</button>"); 
w.document.write("<img id='printArea' src='" + dataURL + "' alt='from canvas'/>");
Community
  • 1
  • 1
Q07
  • 85
  • 2
  • 12

0 Answers0