为什么用canvas绘制不出图形
代码如下:<!DOCTYPEhtml><html><body><canvasid="myCanvas"width="200"height="200"style="bord...
代码如下:
<!DOCTYPE html>
<html>
<body>
<canvas id="myCanvas"width="200"height="200"style="border:1px solid blue">
your browser does not support the canvas element.
</canvas>
<script type="text/JavaScript">
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.beginPath();
cxt.strockStyle="rgb(0,182,0)";
cxt.moveTo(10,10);
cxt.lineTo(10,50);
cxt.lineWidth=14;
cxt.strock();
cxt.closePath();
</script>
</body>
</html>
请问代码哪里有问题嘛 展开
<!DOCTYPE html>
<html>
<body>
<canvas id="myCanvas"width="200"height="200"style="border:1px solid blue">
your browser does not support the canvas element.
</canvas>
<script type="text/JavaScript">
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.beginPath();
cxt.strockStyle="rgb(0,182,0)";
cxt.moveTo(10,10);
cxt.lineTo(10,50);
cxt.lineWidth=14;
cxt.strock();
cxt.closePath();
</script>
</body>
</html>
请问代码哪里有问题嘛 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询