麻烦帮忙看下HTML5这个程序中为什么canvas定义的画板上面的这个图像不显示
<!DOCTYPEHTML><html><head><metahttp-equiv="Content-Type"content="text/html;charset=ut...
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>E6-3-5马云图片</title>
</head>
<body>
<canvas id="mycanvas" width="320" height="220" style="border:5px solid #aa00c3;">
你的浏览器不支持<canvas>标签。
</canvas>
<script>
var c=document.getElementById("mycanvas");
var cxt=c.getContext("2d");
var img=new Image()
img.src="panda.jpg"
cxt.drawImage(img,10,10,300,200);
</script>
</body>
</html> 展开
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>E6-3-5马云图片</title>
</head>
<body>
<canvas id="mycanvas" width="320" height="220" style="border:5px solid #aa00c3;">
你的浏览器不支持<canvas>标签。
</canvas>
<script>
var c=document.getElementById("mycanvas");
var cxt=c.getContext("2d");
var img=new Image()
img.src="panda.jpg"
cxt.drawImage(img,10,10,300,200);
</script>
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询