📜  创建网页上任何元素的动态屏幕截图 - JavaScript 代码示例

📅  最后修改于: 2022-03-11 15:01:41.179000             🧑  作者: Mango

代码示例1
windwindow.takeScreenShot = function() {
    html2canvas(document.getElementById("target"), {
        onrendered: function (canvas) {
            document.body.appendChild(canvas);
        },
        width:320,
        height:220
    });
}ow.takeScreenShot = function() {    html2canvas(document.getElementById("target"), {        onrendered: function (canvas) {            document.body.appendChild(canvas);        },        width:320,        height:220    });}