两个都写才可以截取到网络图
crossOrigin="Anonymous"
<section id="big-content" crossOrigin="Anonymous">
<img crossOrigin="Anonymous" src="https://www.beshtech.com//prodata/aasnew/app02/shop/20190506/4216e21d-ba06-460f-95cc-3fb87e482725.png">
<div crossOrigin="Anonymous" id="qrcode-img"></div>
</section>
html2canvas(document.body, {
useCORS: true,// 允许跨域
onrendered: function(canvas) {
document.body.appendChild(canvas);
}
});
网友评论