$("#btn-html2canvas").on("click",function(){//btn-html2canvas为按钮
//content-main为要转换的元素的id
            html2canvas(document.getElementById('content-main'), {
                onrendered: function(canvas) {
                    document.body.appendChild(canvas);
                },
                 width: 300,
                 height: 300
            });
        })

 

相关文章:

  • 2021-12-22
  • 2021-08-25
  • 2021-07-30
  • 2022-03-07
  • 2021-08-16
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2022-01-31
  • 2022-12-23
相关资源
相似解决方案