为什么我的代码是空白的 请教大神
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<canvas id="canvas" style="border:1px solid #aaa;display:block;margin:50px auto;">
当前浏览器不支持Canvas,请更换浏览器后再试
</canvas>
<script>
window.onload = function(){
var canvas = document.getElementById("canvas");
canvas.width =800;
canvas.height = 800;
var context=canvas.getContext("2d");
context.moveTo=(10,10);
context.lineTo=(800,800);
context.lineWidth=10;
context.strokeStyle="red";
context.stroke();
}
</script>
</body>
</html>