我有以下代码,它在 Firefox 上运行良好,但由于某种原因,图像没有在 Chrome 上呈现,有什么想法吗?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Html2Canvas</title>
<script type="text/javascript" src="jquery-1.6.3.js"></script>
<script type="text/javascript" src="html2canvas.js"></script>
<script type="text/javascript" src="jquery.plugin.html2canvas.js"></script>
</head>
<body>
testing
<img src="someImage.jpg"/>
<script type="text/javascript">
window.onload = function() {
html2canvas( [ document.body ], {
onrendered: function( canvas ) {
document.body.appendChild( canvas );
}
});
};
</script>
</body>
</html>