📜  将 html 转换为图像 laravel - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:28.884000             🧑  作者: Mango

代码示例1
$(function() { 
     $("#btnSave").click(function() { 
        html2canvas($("#widget"), {
        onrendered: function(canvas) {
            theCanvas = canvas;
            document.body.appendChild(canvas);

            // Convert and download as image 
            Canvas2Image.saveAsPNG(canvas); 
            $("#img-out").append(canvas);
            // Clean up 
            //document.body.removeChild(canvas);
        }
    });
});