我已经获得了很多ans(Ans1,Ans2),但是当我尝试通过点击<a>
标签下载它时。它在Google Chrome中显示错误
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'/>");