为什么canvas画布不显示呢,感觉JS代码没有起作用是怎么回事
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>canvas元素示例</title>
</head>
<body>
<h1>canvas元素示例</h1>
<canvas id="canvas" width="1024",height="1080",style="border: 1px solid #aaa;display:block;margin: 50px,auto;">绘图区域</canvas>
<script type="text/javascript">
window.onload=funciotn(){
var canvas=document.getElementById("canvas");
var context=canvas.getContext("2d");
context.moveTo(100,100);
context.lineTo(700,700);
context.stroke();
}
</script>
</body>
</html>