我正在尝试将 html5canvas 转换为图像,并希望再次在页面中加载该图像,但它不起作用。
window.onload = function() {
}
function myFunction() {
var v = document.getElementById("mTextArea").value;
document.getElementById("wow").innerHTML = v;
html2canvas(document.getElementById("imagewrap"), {
onrendered: function(canvas) {
canvas.className = "html2canvas";
var image = canvas.toDataURL("image/png");<====
document.getElementById("img_prev").innerHTML = image;<====
},
useCORS: true
});
}
犯罪嫌疑人X
相关分类