如何在Html2Canvas之外获取变量的值

时间:2015-10-21 07:31:50

标签: javascript jquery html css canvas

我使用Html2Canvas.js将div转换为画布

var canvasimage=""; 
html2canvas($("#dvorder"), {
    onrendered: function (canvas) {
        theCanvas = canvas;
        $('#imgDemo').append(canvas);
        $('#imgDemo canvas').attr('id', 'Billcan');                   
        canvasimage = document.getElementById('Billcan').toDataURL("image/png");                   
    }
});

如何在html2Canvas之外获取变量canvasimage的值 请参考jsfiddle: http://jsfiddle.net/8ypxW/3/

0 个答案:

没有答案