<!DOCTYPE html>
<html lang="zh" >
<head>
<meta http-equiv="pragma" content ="no-cache"/>
<meta http-equiv="Cache-Control" content ="no-cache"/>
<meta http-equiv="expires" content ="-1"/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title></title>
<script src="jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="html5.js" type="text/javascript"></script>
<script src="excanvas.js" type="text/javascript"></script>
</head>
<body>
<canvas id="paperview" style=" border-width:1px; border-color:Red; border-style:solid;position:relative;padding:0px;margin:0px;" >
</canvas>
<script type="text/javascript" language="javascript">
var paper = null;
var img = new Image();
$(function () { var papercontainer = document.getElementById("paperview");
paper = papercontainer.getContext('2d'); //设置画板大小
$("canvas").eq(0).attr("width", 2480);
$("canvas").eq(0).attr("height", 1752);
//图像下载完成后画图像
img.onload = function () {
//清除画板
paper.clearRect();
paper.drawImage(img, 0, 0, img.width, img.height); window.setTimeout(setimg, 2000);
};
img.onerror = function () { alert('下载图像失败!'); }
setimg();
}); //设置图像
function setimg() {
var url="tt.jpg?q=" + Math.random();
img.src = url;
document.title =url;
}
</script>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货