canvas绘制统计图如何生成图片img,并且赋值div

<div class="bt_img bt_img1"><canvas id="bingtu1" width="90" height="90" class="bingtu"></canvas></div>
function print_voucher(){
   $(".bt_img1").html("<img src='"+canvas.toDataURL()+"'/>")
}
print_voucher();

猜你喜欢

转载自www.cnblogs.com/newbo/p/11356131.html