canvas 画布元素不显示,请各位大侠帮忙看下,万分感谢哈,纠结了很久,麻烦知道的快点答复我,谢谢

<html>
<head>
<title>Smile</title>
<script type="text/javascript">
funcion init(){
var canvas=document.creatElement("canvas");
canvas.width=500;
canvas.height=400;
var context =canvas.getContext('2d');
ctx.beginPath();
ctx.strokeStyle="rgb(200,0,0)";
ctx.arc(200,200,50,0,Math.PI,false);
ctx.stroke();
}
</script>
</head>
<body>
<body onLoad="init();">
<canvas id ="canvas"width="400"height="300">
Your browser doesn't support the HTML5 element canvas.
</canvas>
</body>
</html>

第1个回答  2014-05-08
把<canvas></canvas>放到js具体操作画布的前面试试