我使用html2canvas
将div内容转换为图像,我想通过Ajax将其保存到数据库中,但是出现了这个错误:
app.js:1 POST http://127.0.0.1:8000/reports/updatecell 419(未知 状态)
这是我的代码:
html2canvas(document.getElementById("graphContainer"), {
onrendered: function (canvas) {
img = canvas.toDataURL('image/png');
$.ajax({
type: 'POST',
url: '/reports/updatecell',
data: {img: img},
success: function(result){
}
});
},
});